[Numpy-discussion] Change default order to Fortran order

Chris Barker chris.barker at noaa.gov
Mon Aug 3 12:30:06 EDT 2015


On Sun, Aug 2, 2015 at 1:46 PM, Sturla Molden <sturla.molden at gmail.com>
wrote:

> On 02/08/15 22:28, Bryan Van de Ven wrote:
> > And to eliminate the order kwarg, use functools.partial to patch the
> zeros function (or any others, as needed):
>
> This will probably break code that depends on NumPy, like SciPy and
> scikit-image. But if NumPy is all that matters, sure go ahead and monkey
> patch. Otherwise keep the patched functions in another namespace.
>

I"d be really careful about this -- sure it's annoying, but a kind of
global change of behavior could wreak havok.

I'd create a set of Fortran-order constructors -- if it were me, I do:

fzeros
fones,

etc.....

but you could, I suppose, create a namespace and ut hem all there, then
create a fnumpy that would write those over:

import numpy as np

and away you go -- but that wouldn't change any code that imports numpy in
the usual way.

-Chris


-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150803/4a7a9a7f/attachment.html>


More information about the NumPy-Discussion mailing list