View inputs as arrays with at least three dimensions.
Parameters: | array1, array2, ... : array_like
|
---|---|
Returns: | res1, res2, ... : ndarray
|
See also
Examples
>>> numpy.atleast_3d(3.0)
array([[[ 3.]]])
>>> x = numpy.arange(3.0)
>>> numpy.atleast_3d(x).shape
(1, 3, 1)
>>> x = numpy.arange(12.0).reshape(4,3)
>>> numpy.atleast_3d(x).shape
(4, 3, 1)
>>> numpy.atleast_3d(x).base is x
True
>>> for arr in np.atleast_3d(1, [1, 2], [[1, 2]]): print arr, "\n"
...
[[[1]]]