📜  python tableau 2d - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:03.876000             🧑  作者: Mango

代码示例1
>>> u = np.arange(1, 16)
>>> u
array([ 1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15])
>>> np.shape(u)
(15,)
>>> u.shape = (3, 5)
>>> u
array([[ 1,  2,  3,  4,  5],
       [ 6,  7,  8,  9, 10],
       [11, 12, 13, 14, 15]])
>>> np.shape(u)
(3, 5)