Return a copy of the array collapsed into one dimension.
np.array([[1,2,3], [4,5,6]]).flatten() # all dimension to 1 dimension # [[1,2,3], → [1,2,3,4,5,6] # [4,5,6]]
numpy.ndarray.flatten — NumPy v2.1 Manual
‘C’ means to flatten in row-major (C-style) order.
‘F’ means to flatten in column-major (Fortran-
style) order. ‘A’ means to flatten in column-major
order if a is Fortran contiguous in memory,
row-major order otherwise. ‘K’ means to flatten
a in the order the elements occur in memory.
The default is ‘C’.
https://numpy.org/doc/stable/reference/generated/numpy.ndarray.flatten.html

Seonglae Cho