[Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

Ralf Gommers ralf.gommers@gmail....
Wed Apr 3 16:58:37 CDT 2013


On Wed, Apr 3, 2013 at 11:52 PM, Chris Barker - NOAA Federal <
chris.barker@noaa.gov> wrote:

> On Wed, Apr 3, 2013 at 11:39 AM, Matthew Brett <matthew.brett@gmail.com>
> wrote:
> > It was not enough for me or the three others who will publicly admit
> > to the shame of finding it confusing without further thought.
>
> I would submit that some of the confusion came from the fact that with
> ravel(), and the 'A' and 'K' flags, you are forced to figure out BOTH
> index_order and memory_order -- with one flag -- I know I'm still not
> clear what I'd get in complex situations.
>
> > Again, I just can't see a reason not to separate these ideas.
>
> I agree, but really separating them -- but ideally having a given
> function only deal with one or the other, not both at once.
>
> >  We are
> > not arguing about backwards compatibility here, only about clarity.
>
> while it could be changed while strictly maintaining backward
> compatibility -- it is a change that would need to filter through the
> docs, example, random blog posts, stack=overflow questions, etc......
>

Not only that, we would then also be in the situation of having `order`
*and* `xxx_order` keywords. This is also confusing, at least as much as the
current situation imho.

Ralf


> Is that worth it? I'm not convinced
>
> > Right.   I think you may now be close to my own discomfort when faced
> > with working out (fast) what:
> >
> > np.reshape(a, (3,4), order='F')
>
> I still think it's cause you know too much.... ;-)
>
> -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@noaa.gov
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20130403/53b650ab/attachment.html 


More information about the NumPy-Discussion mailing list