Syntax: np.ravel(a, order='C') a: Input array. order: Optional. 'C' means row-major (default), 'F' means column-major, 'A' means Fortran-like if a is Fortran contiguous, otherwise C-like. Example: import numpy as np flat_array = np.ravel(np.array([[1, 2], [3, 4]])) [1 2 3 4] eg 2 import numpy as np arr = np.array([[5, 6, 7], [8, 9, 10]]) flat = np.ravel(arr) print(flat) [ 5 6 7 8 9 10]