[Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering
Matthew Brett
matthew.brett at gmail.com
Thu Apr 4 14:45:38 EDT 2013
Hi,
On Thu, Apr 4, 2013 at 9:21 AM, Chris Barker - NOAA Federal
<chris.barker at noaa.gov> wrote:
> On Wed, Apr 3, 2013 at 6:13 PM, Matthew Brett <matthew.brett at gmail.com> wrote:
>>> We all agree that 'order' is used with two different and orthogonal
>>> meanings in numpy.
Brief thank you for your helpful and thoughtful discussion.
> well, not entirely orthogonal -- they are the some concept, used in
> different contexts,
Here's a further clarification, in the hope that it is helpful:
Input and output index orderings are orthogonal - I can read the data
with C index ordering and return an array that is index ordered
any-old-how.
F and C are used in the sense of F contiguous and C contiguous - where
contiguous is not the same concept as index ordering.
So I think it's hard to say these concepts are not orthogonal, simply
in the technical sense that order='F" could mean:
* read my data using F-style index ordering
* return my data in an array using F-style index ordering
* (related to above) return my data in F-contiguous memory layout
> so there is some benefit to their having
> similarity.
Would you agree with the stuff above? If you do - do you agree that
not separating these ideas could be confusing?
Cheers,
Matthew
More information about the NumPy-Discussion
mailing list