Skip to content
masterclass Buddy

NumPy · Function

np.atleast_2d

Converts one or more inputs to arrays with at least two dimensions. Scalars become 1-by-1 arrays, one-dimensional inputs become rows, and higher-dimensional arrays are preserved when possible.

Last updated

Syntax

numpy.atleast_2d(*arys)

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

Subscribe
  • numpy.atleast_1d
  • numpy.atleast_3d

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