Skip to content
masterclass Buddy

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.

Subscribe
  • numpy.reshape
  • ndarray.resize
  • ndarray.transpose
  • ndarray.ravel
  • ndarray.flatten

Source: numpy.ndarray.reshape — NumPy v2.5 Manual. Checked 2026-11-03.