numpy.atleast_2d()

numpy.atleast_2d

numpy.atleast_2d(*arys) [source]

View inputs as arrays with at least two dimensions.

Parameters:

arys1, arys2, ... : array_like

One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have two or more dimensions are preserved.

Returns:

res, res2, ... : ndarray