[Numpy-discussion] new scipyCore features in numarray - indexing...

Sebastian Haase haase at msg.ucsf.edu
Thu Dec 1 12:24:50 EST 2005

(this was posted to SciPy on 2005-11-16 16:37 - maybe I got lost ;-)
I'm just thinking of a nice feature that I think is now part of new
 scipyCore: Mixing  index ranges in one axis with index lists in another.
   I have index 4,7,9 that I'm intrested in: use a[ [4,7,9] ]
   If I want all section I obviously just say a[ : ]
But what do I do in the 2d case where I want 4,7,9 in one axis and all in the
other ?  I understood that the new scipyCore allows a[:, [4,7,9]]
whereas numarray gives an error !?

Sebastian Haase

On Friday 04 November 2005 14:57, Todd Miller wrote:
> Sebastian Haase wrote:
> >Also I always need to thank Todd et al. for numarray which we are using
> > for about 4 years now.
> I'm glad you found numarray useful.
> >I was following - I thought - all the postings here, but I don't remember
> > when and what the reason was when a.type() changed  to a.dtype (also
> > there is a "dtypecode" somewhere !?). Any reference or explanation would
> > be great. I have to say that the (old) parenthesis where always quite
> > "annoying" ! ;-)
> >
> >Question: does the way allow assignments like "a.dtype = Float32".
> >What does it do ? If not, is it raising an error (I had 2 different people
> >yesterday who tried to assign to a.type here in our lab ...)
> >
> >Also is this now completely supported/tested and suggested for numarray ?
> > (For the time numarray is still separate)
> I'm adding support for some of newcore's new interface features out of
> desire to make it easier to migrate.  Our intent is to make it possible
> to write newcore code and run it on numarray now as newcore matures.
> Not every newcore feature is going to be supported,  but we'll make an
> effort to support those which are easy to implement.   Let me know is
> there's some newcore idiom you want to use that numarray doesn't have yet.
> Regards,
> Todd

SciPy-user mailing list
SciPy-user at scipy.net

More information about the NumPy-Discussion mailing list