Re: [Numpy-discussion] dtype comparison and hashing

2008-10-18 Thread Geoffrey Irving
On Wed, Oct 15, 2008 at 12:56 PM, Robert Kern [EMAIL PROTECTED] wrote: On Wed, Oct 15, 2008 at 02:20, Geoffrey Irving [EMAIL PROTECTED] wrote: Hello, Currently in numpy comparing dtypes for equality with == does an internal PyArray_EquivTypes check, which means that the dtypes NPY_INT and

[Numpy-discussion] problem installing numpy using scons

2008-10-18 Thread Hoyt Koepke
Hello, I'm trying to install the latest numpy using setupscons.py, but it gives me an error that I can't track down. It's in the latest numpy release (5946). with the latest numpyscons from the 0.9.3 branch. Here's the last part of output: is bootstrapping ? True Executing scons command (pkg

[Numpy-discussion] Getting an array's indices when a given condition is true

2008-10-18 Thread Michael
Hi list, been playing around with stride_tricks and find it terrifically productive; thankyou to everyone who has worked on this. I need to filter some data, getting the indices of all entries which are less than or equal to 'limit'. How do i best go about that? Can you enumerate an array

Re: [Numpy-discussion] Getting an array's indices when a given condition is true

2008-10-18 Thread Lane Brooks
If you want the indexes, check out the np.where command, e.g. idx = np.where(dat = limit) If you want the values, use: val = dat[dat = limit] Lane Michael wrote: Hi list, been playing around with stride_tricks and find it terrifically productive; thankyou to everyone who has worked on

Re: [Numpy-discussion] Getting an array's indices when a given condition is true

2008-10-18 Thread Robert Kern
On Sat, Oct 18, 2008 at 22:00, Lane Brooks [EMAIL PROTECTED] wrote: If you want the indexes, check out the np.where command, e.g. idx = np.where(dat = limit) It's worth noting that where() confusingly has two modes of functionality. This particular bit of functionality is also exposed under

[Numpy-discussion] Images and numpy

2008-10-18 Thread Lane Brooks
What are the preferred ways to get images, like jpgs and pngs, from disk into a numpy array and from a numpy array to disk? I did some google searches and found a PEP thread where Travis was proposing an extended buffer protocol that would make for easier interoperability with libraries such

Re: [Numpy-discussion] Images and numpy

2008-10-18 Thread Robert Kern
On Sat, Oct 18, 2008 at 23:07, Lane Brooks [EMAIL PROTECTED] wrote: What are the preferred ways to get images, like jpgs and pngs, from disk into a numpy array and from a numpy array to disk? I did some google searches and found a PEP thread where Travis was proposing an extended buffer

Re: [Numpy-discussion] Images and numpy

2008-10-18 Thread Lane Brooks
Robert Kern wrote: On Sat, Oct 18, 2008 at 23:07, Lane Brooks [EMAIL PROTECTED] wrote: What are the preferred ways to get images, like jpgs and pngs, from disk into a numpy array and from a numpy array to disk? I did some google searches and found a PEP thread where Travis was proposing an