SciPy

This is documentation for an old release of NumPy (version 1.14.5). Read this page in the documentation of the latest stable release (version > 1.17).

numpy.ndarray.reshape

ndarray.reshape(shape, order='C')

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

Refer to numpy.reshape for full documentation.

See also

numpy.reshape
equivalent function

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(10, 11) is equivalent to a.reshape((10, 11)).

Previous topic

numpy.ndarray.repeat

Next topic

numpy.ndarray.resize