Return a copy of the array collapsed into one dimension.
Parameters:
order : {‘C’, ‘F’, ‘A’, ‘K’}, optional
‘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’.
Returns:
y : ndarray
A copy of the input array, flattened to one dimension.
flatten是numpy.ndarray.flatten的一个函数,其官方文档是这样描述的:ndarray.flatten(order='C')Return a copy of the array collapsed into one dimension.Parameters: order : {‘C’, ‘F’, ‘A’, ‘K’}, optional ...