[Numpy-discussion] isfortran compatibility in numpy 1.10.

Sturla Molden sturla.molden at gmail.com
Mon Nov 2 00:22:01 EST 2015

Charles R Harris <charlesr.harris at gmail.com> 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 `a.flags.f_contiguous and a.ndim > 1`, which would be backward
>    compatible.

This one is just wrong.

A compromize might be to raise an exception in the case of a.ndim<2. 


More information about the NumPy-Discussion mailing list