{ } Raw JSON

bundles / astropy 7.0.1 / astropy / utils / shapes / NDArrayShapeMethods / reshape

function

astropy.utils.shapes:NDArrayShapeMethods.reshape

source: /astropy/utils/shapes.py :81

Signature

def   reshape ( self * args ** kwargs )

Summary

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

Extended Summary

Parameters are as for ~numpy.ndarray.reshape. Note that it is not always possible to change the shape of an array without copying the data (see reshape documentation). If you want an error to be raise if the data is copied, you should assign the new shape to the shape attribute (note: this may not be implemented for all classes using NDArrayShapeMethods).

Aliases

  • astropy.utils.NDArrayShapeMethods.reshape