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.
SubscribeRelated
numpy.atleast_1dnumpy.atleast_3d