2016-10-10 numpy で 配列の次元数を取得する Python メモ: numpy で配列の次元数を取得する import numpy A = numpy.array([1, 2, 3]) numpy.ndim(A) >> 1 A.ndim >> 1 の2種類ある。