Re: [Numpy-discussion] Multi-dimensional indexing

2009-09-21 Thread Daran L. Rife
I forgot to mention that the second array, which I wish to conditionally select elements from using tmax_idx, has the same dimensions as the "speed" array, That is, (ntimes, nlon, nlat) = U.shape And tmax_idx has dimensions of (nlon, nlat). Daran -- > My apology for the simplemindedness of

[Numpy-discussion] Efficient removal of duplicates: Numpy discussion board

2009-03-29 Thread Daran L. Rife
Marjolaine, Solution: unique_index = [i for i,x in enumerate(l) if not or x != l[i-1]] Remember that enumerate gives the index,value pairs of the items in any iterable object. Try it for yourself. Here's the output from my IDLE session. In [1]: l = [(1,1), (2,3), (1, 1), (4,5), (2,3), (10,21)

[Numpy-discussion] Request for porting pycdf to NumPy

2007-02-09 Thread Daran L. Rife
Hi Travis, If you're still offering NumPy "patches" to third party packages that rely upon Numeric, I would really like for pycdf to be ported to NumPy. This would allow me to completely transition to NumPy. Thanks very much for considering my request. Daran Rife __