Numpy, Python Programming, Data Analysis, Numerical Analysis, Data Science.
array arr.flatten() # flattens the array into a 1D array arr.T # transposes the array Array Indexing and Slicing arr[2] # returns the 3rd element in a 1D array arr[1, 2] # returns the element at row 1, column 2 in a 2D array arr[:, 1] # returns all rows, column 1 in a 2D array arr[:, 2:] # returns