arr = Np.array ([[1,2],[3,4]])
arr = Np.array ([[1,2],[3,4]], Dtype=complex)
arr = Np.zeros ((3,4))
arr = Np.ones (())
arr = Np.arange (4,10). Reshape (2,3)
arr = Np.linspace (0,1,6) #[0.0,0.2,0.4,0.6,0.8,1.0]
arr = Np.random.random (3)
arr = Np.random.random ((5,2))
Type (arr): Numpy.ndarray
Arr.dtype:int32, float64 ...
Arr.ndim:2
Arr.size:4
Arr.shape: (2l,2l)
Arr.itemsize:4
- Array calculation function
Arr+1: Elements and
Arr*2: Elemental Product
ARR1+ARR2: Elements and
ARR1*ARR2: Elemental Product
Np.dot (arr1, ARR2): Matrix product
Sin (arr): element trigonometric Functions
sqrt (arr): Elemental root
Arr.sum (): All elements and
Arr.min (): Minimum value for all elements
Arr.max (): all element Maximum value
Arr.mean (): Average of all elements
Np.apply_along_axis (Np.mean, Axis=0, Arr=arr): Iteration by column
Np.apply_along_axis (Lambda x:x*2, Axis=1, Arr=arr): Iteration by row
arr<0.5
Np.vstack ((arr1, ARR2)): Vertically into the stack
Np.hstack ((arr1, ARR2)): Horizontal into the stack
Np.vsplit (arr, n): Vertically split N part
Np.hsplit (arr, n): Horizontal split N part
Np.split (arr, [1,3,5], Axis=1): Vertical split
Np.save (' Data.npy ', arr)
arr = np.load (' data.npy ')
"Python data Analytics Combat" 3 NumPy Library