numpy.ndarray.reshape — NumPy v2.6.dev0 Manual

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 to

numpy.reshape

for full documentation.

Notes

Unlike the free function

numpy.reshape

, this method on

ndarray

allows the elements of the shape parameter to be passed in as separate arguments. For example, a.reshape(4,2) is equivalent to a.reshape((4,2)).