[Numpy-discussion] Change default order to Fortran order

Nathaniel Smith njs at pobox.com
Sun Aug 2 18:08:19 EDT 2015


On Aug 2, 2015 6:59 AM, "Kang Wang" <kwang24 at wisc.edu> wrote:
>
> Hi,
>
> I am an imaging researcher, and a new Python user. My first Python
project is to somehow modify NumPy source code such that everything is
Fortran column-major by default.
>
> I read about the information in the link below, but for us, the fact is
that we absolutely want to  use Fortran column major, and we want to make
it default. Explicitly writing " order = 'F' " all over the place is not
acceptable to us.
>
http://docs.scipy.org/doc/numpy/reference/internals.html#multidimensional-array-indexing-order-issues
>
> I tried searching in this email list, as well as google search in
general. However, I have not found anything useful. This must be a common
request/need, I believe.

It isn't, I'm afraid. Basically what you're signing up for is to maintain
your own copy of numpy all by yourself. You're totally within your rights
to do this, but it isn't something I would really recommend as a first
python project (to put it mildly).

And unfortunately, there are plenty of libraries out there that use numpy
and assume they will get C order by default, so your version of numpy will
create lots of obscure errors, segfaults, etc. as you start using it with
other packages. Obviously this will be a problem for you -- basically you
may find yourself having to maintain your own copy of lots of libraries.
Less obviously, this would also create a big problem for us, because your
users will start filling bug reports on numpy, or on these random third
party packages, and it will be massively confusing and a big waste of time
because the problem will be with your package, not with any of our code. So
if you do do this, please either (a) change the name of your package
somehow ('import numpyfortran' or similar) so that everyone using it is
clear that it's a non-standard product, or else (b) make sure that you only
use it within your own team, don't allow anyone else to use it, and make a
rule that no one is allowed to file bug reports, or ask or answer questions
on mailing lists or stackoverflow, unless they have first double checked
*every* time that what they're saying is also valid when using regular
numpy.

Again, I strongly recommend you not do this.

There are literally millions of users who are using numpy as it currently
is, and able to get stuff done. I don't know your specific situation, but
maybe if you describe a bit more what it is you're doing and why you think
you need all-Fortran-all-the-time, then people will be able to suggest
strategies to work around things on your end, or find smaller tweaks to
numpy that could go into the standard version.

-n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150802/e2ae35fb/attachment.html>


More information about the NumPy-Discussion mailing list