Skip to content
masterclass Buddy

NumPy · Function

np.reshape

numpy.reshape changes an array to a compatible shape without changing its data. It may return a view or create a copy.

Last updated

Syntax

numpy.reshape(a, /, shape, order='C', *, copy=None)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • numpy.ndarray.reshape
  • numpy.ravel

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