[Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering
Chris Barker - NOAA Federal
chris.barker at noaa.gov
Wed Apr 3 17:52:24 EDT 2013
On Wed, Apr 3, 2013 at 11:39 AM, Matthew Brett <matthew.brett at 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......
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.... ;-)
Christopher Barker, Ph.D.
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
More information about the NumPy-Discussion