x = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
[0 1 2 3 4 5 6 7 8 9]
array([6])
x = np.array([
[
[1],[2],[3]
],
[
[4],[5],[6]
]
])
array([[[1],
[2],
[3]],
[[4],
[5],
[6]]])
(2, 3, 1)
array([[[1, 4],
[2, 5],
[3, 6]]])
(2, 3, 1)
array([[[1, 4],
[2, 5],
[3, 6]]])
(2, 3, 1)
y = np.array([1, 4, 5], ndmin = 2)
array([[1, 4, 5]])
(1, 3)
array([[1],
[4],
[5]])
(1, 3)
a = np.array([12, 2], dtype = complex)
array([12.+0.j, 2.+0.j])
(2,)
a = np.array([12, 2], dtype = complex, ndmin=2)
array([[12.+0.j, 2.+0.j]])
(1, 2)