I bet it has all been said already, but to note just in case. In numpy itself
we use it mostly to determine the memory order of the *output* and not for
safty purpose. That is the macro of course and I think yelling people to use
flags.fnc in python is better.
- Sebastian
On Mon Nov 2
On Mon, Nov 2, 2015 at 11:28 AM, Sebastian Berg
wrote:
> I bet it has all been said already, but to note just in case. In numpy
> itself we use it mostly to determine the memory order of the *output* and
> not for safty purpose. That is the macro of course and I think
Charles R Harris wrote:
>1. Return `a.flags.f_contiguous`. This differs for 1-D arrays, but is
>most consistent with the name isfortran.
If the idea is to determine if an array can safely be passed to Fortran,
this is the correct one.
>2. Return
Hi All,
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
As I posted to the github issue, I support #2 as it is the original
meaning. The most common case of isfortran that I recall was to support
transpositions that needed to occur before calling Fortran-compiled linear
algebra routines.
However, with that said, you could also reasonably do #1 and