[Numpy-discussion] isfortran compatibility in numpy 1.10.
Charles R Harris
charlesr.harris at gmail.com
Fri Oct 30 18:12:50 EDT 2015
The isfortran function calls a.fnc (Fortran-Not-C), which is implemented
as F_CONTIGUOUS && !C_CONTIGUOUS. Before relaxed stride checking
contiguous multidimensional arrays could not be both and continguous 1-D
arrays were always CONTIGUOUS, but this is not longer the case.
Consequently current isfortran breaks backward compatiblity. There are two
1. Return `a.flags.f_contiguous`. This differs for 1-D arrays, but is
most consistent with the name isfortran.
2. Return `a.flags.f_contiguous and a.ndim > 1`, which would be backward
It is also possible to start with 2. but add a FutureWarning and later move
to 1, which it my preferred solution. See gh-6590
<https://github.com/numpy/numpy/issues/6590> for the issue.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion