NumPy · Method
ndarray.reshape
ndarray.reshape gives an existing NumPy array a new shape without changing its elements. You can pass the shape as a tuple or as separate dimensions.
Last updated
Syntax
a.reshape(*shape, order='C', copy=None)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
numpy.reshapendarray.resizendarray.transposendarray.ravelndarray.flatten