Re: [Numpy-discussion] Images and numpy

2008-10-18 Thread Robert Kern
On Sun, Oct 19, 2008 at 01:08, Nadav Horesh <[EMAIL PROTECTED]> wrote: > I encountered an exception: "nonstandard" format like 16 bits tiff I/O works > only via the tostring/fromstring interface. Yup. Internally, PIL doesn't necessarily represent the data in the same way that numpy does, so you h

Re: [Numpy-discussion] Images and numpy

2008-10-18 Thread Nadav Horesh
I encountered an exception: "nonstandard" format like 16 bits tiff I/O works only via the tostring/fromstring interface. Nadav -הודעה מקורית- מאת: [EMAIL PROTECTED] בשם Lane Brooks נשלח: א 19-אוקטובר-08 06:45 אל: Discussion of Numerical Python נושא: Re: [Numpy-discussion] Images and n

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

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

[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 a

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 und

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 th

[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 us

[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 is

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