Please enable JavaScript.
Coggle requires JavaScript to display documents.
NumPy - Coggle Diagram
NumPy
Array Creation
-
array_2D = np.array([list_1,list_2])
array_3D = np.array([array1_2D,...,arrayN_2D])
np.ones, np.zeros, np.random.random
-
Array data types, type conversion and type coercion
-
-
Filtering
Filtering with np.where
row_ind, col_ind = np.where(sudoku_game == 0)
-
Broadcasting
operations between arrays of different sizes - "stretches" smaller array to match the dimensions of the larger array
compatibility rules - each pair of dimensions must be equal, or at least one of the dimensions must be one
-
-
-
Concatenation
np.concatenate((array1, array2),axis=0)
Replacing
np.where(A[:,1]>25,A[:,1],-1)
np.where(A==0,"",sudoku_game)
Deletion
np.delete receives 3 arguments: the original array, the indexes of the sub-arrays to be deleted, and the dimension (axis) along which to delete; np.delete returns a new array
trimmed_classroom_data = np.delete(classrom_data,2,axis=1)*
-
-