[Numpy-discussion] Multiarray PEP
Perry Greenfield
perry at stsci.edu
Thu Feb 17 08:29:22 EST 2005
I'm generally going to refrain from making comments since it usually is
obvious what we prefer. But there may be exceptions (perhaps a reminder
of past arguments, a desire to change numarray behavior, or clarify
what the issue is).
On Feb 17, 2005, at 2:25 AM, Travis Oliphant wrote:
>
> I am looking for feedback on the PEP. Of particular interest is the
> specification of multidimensional indexing that I've outlined. I
> think it is mostly the same as numarray (I'd love some feedback to be
> sure about that), except for the fact that X[K] where K is a a single
> integer index array can do 1-d indexing similar to MATLAB. The
> equivalent numarray indexing is available as X[K,]. Now that I've
> specified what is to happen, I think it won't be very difficult to
> code.
Could you clarify this with an example? I'm not quite sure what
alternatives you are addressing.
> I would also like some help on resolving the type issue. Is it
> important to have hierarchial classes defined (probably in Python)
> that can be used to check and/or specify type or are functions that
> check for various properties, fine. Right now x.type is specified as
> an attribute but the attribute could be replaced by a method. What to
> return is the biggest question.
I'll just note that the hierarchial approach allows simpler tests for
kinds of types (e.g., is the type an integer type) rather than doing
something like ntype in [Int16, Int8,...].
Thanks, Perry
More information about the NumPy-Discussion
mailing list