Skip to content
masterclass Buddy

NumPy · Pipe

ndarray.ndim

ndarray.ndim is the number of dimensions in a NumPy array. Use it to find how many axes the array has.

Last updated

Syntax

ndarray.ndim

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

Subscribe
  • numpy.ndim
  • ndarray.shape
  • shape

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