Most Commonly Used NumPy Array Methods
Method Description
ndim Number of dimensions
shape Gives (rows, columns) of the array
dtype Data type of array elements
reshape() Change the shape of array
flatten() Convert multi-dimensional array to 1D
ravel() Flatten the array (returns a view if possible)
transpose() Flip rows and columns
sum() Sum of elements
mean() Average of elements
max() Maximum value
min() Minimum value
argmax() Index of maximum value
argmin() Index of minimum value
sort() Sort the elements
astype() Change data type of array elements
copy() Create a deep copy of array
tolist() Convert array to Python list