numpy.ndarray.reshape#

method

ndarray.reshape(shape,/,*,order='C',copy=None)a.reshape(*shape,order='C',copy=None)#
ndarray.reshape(*shape,order='C',copy=None)None

Returns an array containing the same data with a new shape.

Refer tonumpy.reshape for full documentation.

See also

numpy.reshape

equivalent function

Notes

Unlike the free functionnumpy.reshape, this method onndarray allowsthe elements of the shape parameter to be passed in as separate arguments.For example,a.reshape(4,2) is equivalent toa.reshape((4,2)).

On this page