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 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 build is working more or

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 wrote: > On Thu, Feb 26, 2009 at 4:32 PM, Charles R Harris > 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 gett

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 mailing

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 p

Re: [Numpy-discussion] CROSS-COMPILING NUMPY

2009-02-26 Thread David Cournapeau
On Tue, Feb 17, 2009 at 12:37 PM, David Cournapeau 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 platform. All the tes

[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, v2.Id))[0]

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 setmember

[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 array([1,2,3,4,5,6,

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/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (20

[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 "", line 1, in TypeError: only length-1 arrays can be converted to Python scalars How should I do this? -gideon ___ Numpy-discussion mailin

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 "", line 1, in > TypeError: only length-1 arrays can be converted to Python scalars > How should I do this? nu

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

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

2009-02-26 Thread Robert Kern
On Thu, Feb 26, 2009 at 17:05, John Hunter 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 from?  The arra

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 poi

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 "", line 1, in > TypeError: only length-1 arrays can be converted to Python scalars > > How should I do this? numpy.arange(0,10, dtype=float) or n

Re: [Numpy-discussion] Slicing/selection in multiple dimensions simultaneously

2009-02-26 Thread Jonathan Taylor
Am I right to assume that there is no way elegant way to interact with slices. i.e. Is there anyway to get a[ix_([2,3,6],:,[3,2])] to work? So that the dimension is completely specified? Or perhaps the only way to do this is via a[ix_([2,3,6],range(a.shape[1]),[3,2])] If anyone knows a bette

[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 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 create an array