・In Japanese
■Explanation of the ndmin function Change the dimensions of an array. ■Example of ndmin function
import numpy as np a=np.array([1,2,3,]) print(a.ndim) #ndim is a function that returns the dimension of an array ⇒ 1 a=np.array([1,2,3,],ndmin=2) #Set the dimension to 2 print(a) ⇒ array([[1, 2, 3]]) print(a.ndim) ⇒ 2