numpy.atleast_2d(*arys)
把输入看成至少有两个dimension的array
Parameters:
arys1, arys2, … : array_like
形似数组的序列,不是数组被转为数组,dimension>=2保留
Returns:
res, res2, … : ndarray
An array, or list of arrays, each with a.ndim >= 2. Copies are avoided where possible, and views with two or more dimensions are returned.
print(np.atleast_2d(3))
print(np.atleast_2d([1,3,5]))
print(np.atleast_2d(2,[1,5,7],[[3,5,6]]))
b = atleast_2d(np.ones([6<