numpy 1.22.4 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
asfortranarray(a, dtype=None, *, like=None)

Parameters

a : array_like

Input array.

dtype : str or dtype object, optional

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

like : array_like

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.

versionadded

Returns

out : ndarray

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

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

See Also

asanyarray

Convert input to an ndarray with either row or column-major memory order.

ascontiguousarray

Convert input to a contiguous (C order) array.

ndarray.flags

Information about the memory layout of the array.

require

Return an ndarray that satisfies requirements.

Examples

>>> x = np.arange(6).reshape(2,3)
... y = np.asfortranarray(x)
... x.flags['F_CONTIGUOUS'] False
>>> y.flags['F_CONTIGUOUS']
True

Note: This function returns an array with at least one-dimension (1-d) so it will not preserve 0-d arrays.

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.linalg.blas.find_best_blas_type numpy.ascontiguousarray numpy.asarray numpy.asarray_chkfinite numpy.require numpy.asanyarray

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : None#None
type: <class 'builtin_function_or_method'>
Commit: