목차
접기
3차원 배열..
import numpy as np
# 2x3x4 array
d = np.array([
[[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]],
[[11, 12, 13, 14], [15, 16, 17, 18], [19, 20, 21, 22]]
])
print(d)
print(len(d))
print(len(d[0]))
print(len(d[0][0]))
[코드 실행 결과]
[[[ 1 2 3 4]
[ 5 6 7 8]
[ 9 10 11 12]]
[[11 12 13 14]
[15 16 17 18]
[19 20 21 22]]]
2
3
4
728x90