numpy.ma.atleast_2d(*args, **kwargs) = <numpy.ma.extras._fromnxfunction_allargs object>
Parameters: |
|
---|---|
Returns: |
|
The function is applied to both the _data and the _mask, if any.
>>> np.atleast_2d(3.0) array([[3.]])
>>> x = np.arange(3.0) >>> np.atleast_2d(x) array([[0., 1., 2.]]) >>> np.atleast_2d(x).base is x True
>>> np.atleast_2d(1, [1, 2], [[1, 2]]) [array([[1]]), array([[1, 2]]), array([[1, 2]])]
© 2005–2019 NumPy Developers
Licensed under the 3-clause BSD License.
https://docs.scipy.org/doc/numpy-1.17.0/reference/generated/numpy.ma.atleast_2d.html