[Numpy-discussion] new scipyCore features in numarray - indexing...
jmiller at stsci.edu
Thu Dec 1 13:50:53 CST 2005
Sebastian Haase wrote:
>(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 !?
Yep, my impression is that the indexing in scipy newcore is an
improvement over numarray which was itself a functional improvement over
Numeric. I'm pretty sure fixing this in numarray is not a simple hack
so, for now anyway, it won't get fixed. I wish I had better news...
>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.
>SciPy-user mailing list
>SciPy-user at scipy.net
>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
>for problems? Stop! Download the new AJAX search engine that makes
>searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
>Numpy-discussion mailing list
>Numpy-discussion at lists.sourceforge.net
More information about the Numpy-discussion