Re: [Numpy-discussion] Core math library in numpy

2009-02-26 Thread David Cournapeau
On Thu, Feb 26, 2009 at 4:32 PM, Charles R Harris charlesr.har...@gmail.com wrote: Sounds good, I don't think the complex functions are a pressing concern. But I suspect we should start looking forward to a code freeze in a month or so and getting the build working is a clear priority. The

Re: [Numpy-discussion] Core math library in numpy

2009-02-26 Thread Charles R Harris
On Thu, Feb 26, 2009 at 1:23 AM, David Cournapeau courn...@gmail.comwrote: On Thu, Feb 26, 2009 at 4:32 PM, Charles R Harris charlesr.har...@gmail.com wrote: Sounds good, I don't think the complex functions are a pressing concern. But I suspect we should start looking forward to a code

Re: [Numpy-discussion] Core math library in numpy

2009-02-26 Thread David Cournapeau
Charles R Harris wrote: Yes, I was thinking about that too. There was a 1.3 thread a couple of weeks ago, we should summarize it, and set a timeline for 1.3 really soon. I can do it, unless you want do it it, Why don't you make a start. Ok, David

[Numpy-discussion] coremath branch merged

2009-02-26 Thread David Cournapeau
Hi, I've just merged the work on the coremath branch into the trunk. Let me know if you see some problems - I did a quick sanity check on Linux after the merge, but I have not tested across many platforms, cheers, David ___ Numpy-discussion

Re: [Numpy-discussion] coremath branch merged

2009-02-26 Thread Darren Dale
On Thu, Feb 26, 2009 at 5:29 AM, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Hi, I've just merged the work on the coremath branch into the trunk. Let me know if you see some problems - I did a quick sanity check on Linux after the merge, but I have not tested across many

Re: [Numpy-discussion] CROSS-COMPILING NUMPY

2009-02-26 Thread David Cournapeau
On Tue, Feb 17, 2009 at 12:37 PM, David Cournapeau courn...@gmail.com wrote: Also, some configuration tests need to be executed on the target machine: this needs to be fixed. Ok, that one at least is fixed. Now, the numpy configuration stage does not need to execute anything on the target

[Numpy-discussion] intersect1d and setmember1d

2009-02-26 Thread mudit sharma
intersect1d and setmember1d doesn't give expected results in case there are duplicate values in either array becuase it works by sorting data and substracting previous value. Is there an alternative in numpy to get indices of intersected values. In [31]: p nonzero(setmember1d(v1.Id,

Re: [Numpy-discussion] intersect1d and setmember1d

2009-02-26 Thread Zachary Pincus
Hi, intersect1d and setmember1d doesn't give expected results in case there are duplicate values in either array becuase it works by sorting data and substracting previous value. Is there an alternative in numpy to get indices of intersected values. From the docstring for setmember1d

[Numpy-discussion] What's wrong with floatint.c example code?

2009-02-26 Thread Ralph Heinkel
Hi, I'm trying to get into the realm of implementing my own numpy data types in numpy, and doing so I had a look at the floatint.c example coming from the numpy/doc/newdtype_example directory. Obviously it is not possible to create an array with the new floatint type by doing

Re: [Numpy-discussion] Fancy indexing question:

2009-02-26 Thread Christopher Barker
Ravi wrote: Use ix_: In [5]: a[ ix_(i,j) ] Out[5]: array([[ 5, 7], [13, 15], [17, 19]]) Very nice! thanks, -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206)

[Numpy-discussion] casting integers to reals

2009-02-26 Thread Gideon Simpson
I want to do: numpy.float(numpy.arange(0, 10)) but get the error: Traceback (most recent call last): File stdin, line 1, in module TypeError: only length-1 arrays can be converted to Python scalars How should I do this? -gideon ___

Re: [Numpy-discussion] casting integers to reals

2009-02-26 Thread Gael Varoquaux
On Thu, Feb 26, 2009 at 05:53:28PM -0500, Gideon Simpson wrote: I want to do: numpy.float(numpy.arange(0, 10)) but get the error: Traceback (most recent call last): File stdin, line 1, in module TypeError: only length-1 arrays can be converted to Python scalars How should I do this?

[Numpy-discussion] numpy save files from C

2009-02-26 Thread John Hunter
A colleague of mine has a bunch of numpy arrays saved with np.save and he now wants to access them directly in C, with or w/o the numpy C API doesn't matter. Does anyone have any sample code lying around which he can borrow from? The array is a structured array with an otherwise plain vanilla

Re: [Numpy-discussion] numpy save files from C

2009-02-26 Thread Robert Kern
On Thu, Feb 26, 2009 at 17:05, John Hunter jdh2...@gmail.com wrote: A colleague of mine has a bunch of numpy arrays saved with np.save and he now wants to access them directly in C, with or w/o the numpy C API doesn't matter.  Does anyone have any sample code lying around which he can borrow

Re: [Numpy-discussion] casting integers to reals

2009-02-26 Thread Christopher Barker
Gael Varoquaux wrote: nump.arange(0, 10.astype(numpy.float) I think you meant: np.arange(0, 10).astype(np.float) but: np.arange(0, 10, dtype=np.float) is a better bet. but in this special case you can do: numpy.arange(0., 10.) yup -- however, beware, using arange() with floating point

Re: [Numpy-discussion] casting integers to reals

2009-02-26 Thread Eric Firing
Gideon Simpson wrote: I want to do: numpy.float(numpy.arange(0, 10)) but get the error: Traceback (most recent call last): File stdin, line 1, in module TypeError: only length-1 arrays can be converted to Python scalars How should I do this? numpy.arange(0,10, dtype=float) or

[Numpy-discussion] Speedup creation of a 3-color array from a 2-d color-index array a color lut

2009-02-26 Thread Delbert Franz
I have geotiff files of scanned paper maps that use an indexed color scheme with a 256-element color lookup table (color lut) and a 9252 by 7420 array of uint8 elements. The color is given by three values. I want to create an array with shape: (9252, 7420, 3) so that I can display the image

Re: [Numpy-discussion] Speedup creation of a 3-color array from a 2-d color-index array a color lut

2009-02-26 Thread Robert Kern
On Thu, Feb 26, 2009 at 23:27, Delbert Franz d...@iqdotdt.com wrote: I have  geotiff files of scanned paper maps that use an indexed color scheme with a 256-element color lookup table (color lut) and a 9252 by 7420 array  of uint8 elements. The color is given by three values.  I want to