numpy.asfortranarray#

numpy.asfortranarray(a, dtype=None, *, like=None)#

Return an array (ndim >= 1) laid out in Fortran order in memory.

Parameters:
aarray_like

Input array.

dtypestr or dtype object, optional

By default, the data-type is inferred from the input data.

likearray_like, optional

Reference object to allow the creation of arrays which are not NumPy arrays. If an array-like passed in as like supports the __array_function__ protocol, the result will be defined by it. In this case, it ensures the creation of an array object compatible with that passed in via this argument.

Returns:
outndarray

The input a in Fortran, or column-major, order.

See also