Re: [Numpy-discussion] gradient with memmap array bug (?)

2011-09-06 Thread Fred
Le 05/09/2011 18:41, Ralf Gommers a écrit : > That rings a bell. I can reproduce this with 1.5.1, and it's fixed in > master. Thanks! Cheers, -- Fred ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailm

[Numpy-discussion] gradient with memmap array bug (?)

2011-09-05 Thread Fred
Hi all, I get some issue using gradient on an array created from memmap: PC-Fred[pts/10]:~/{11}/> ipython -p numpy Python 2.6.7 (r267:88850, Jul 10 2011, 08:11:54) Type "copyright", "credits" or "license" for more information. IPython 0.10.2

Re: [Numpy-discussion] Condensing array...

2011-02-25 Thread Fred
Gaël, Olivier, I finally got working it. I don't compute the nearest value but the mean. Works like a charm ;-) Thanks anyway. Cheers, -- Fred ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/lis

Re: [Numpy-discussion] Condensing array...

2011-02-25 Thread Fred
ut array data.shape = (nx, ny, nz) -> data[::ax, ::ay, ::az], ie output array data[::ax, ::ay, ::az].shape = (nx/ax, ny/ay, nz/az). -- Fred ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] Condensing array...

2011-02-25 Thread Fred
ld like to have in one cell of the decimated array is the nearest (for instance) value in the big array. This is what I call a "condensated array". How could I do that, a la NumPy? TIA. Cheers, -- Fred ___ NumPy-Discussion mailing list NumPy-

Re: [Numpy-discussion] 3D array -> 2D array issue...

2011-02-07 Thread Fred
Le 07/02/2011 13:37, josef.p...@gmail.com a écrit : > n0, n1 = k.shape > ind0 = np.arange(n0)[:,None] > ind1 = np.arange(n1) > q0 = C1[ind0,ind1, k[ind0,ind1]] > > or better > q0 = C1[ind0,ind1, k] Great!!! Thanks a lot. Cheers, -- Fred

[Numpy-discussion] 3D array -> 2D array issue...

2011-02-07 Thread Fred
work. How could I do this ala NumPy? TIA Cheers, -- Fred ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] convolve optimisation...

2009-06-24 Thread fred
gt; illustrate his very nifty Neighbour Iterator. Ok. Cheers, -- Fred ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] convolve optimisation...

2009-06-24 Thread fred
fred a écrit : > Hi all, > > Say I have a 2D array A(nx, ny). > > In each A[i, j] I want to compute convolve(a, kernel) > > where a is subarray of A. > > a and kernel are small besides A. I forgot to mention: kernel is not constant, of course. It varies vs.

[Numpy-discussion] convolve optimisation...

2009-06-24 Thread fred
t I want? Any idea? TIA. Cheers, -- Fred ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] detecting point out of bounds...

2009-06-17 Thread fred
Robert Kern a écrit : > ((data[:,0]xmax) | (data[:,1] (data[:,1]>ymax)).sum() Nice, as usual ;-) I did not know this writing. Thanks a lot. Cheers, -- Fred ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/m

[Numpy-discussion] detecting point out of bounds...

2009-06-17 Thread fred
and I don't want to use a loop to count the number of bad points, of course. Any clue? TIA. Cheers, -- Fred ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] finding index in an array...

2009-06-13 Thread fred
Emmanuelle Gouillart a écrit : > Hi Fred, Hi Manue ;-) > here is another solution >>>> A = np.arange(99).reshape((33,3) >>>> mask = (A==np.array([0,1,2])) >>>> np.nonzero(np.prod(mask, axis=1))[0] > array([0] > > I found it to be less elegan

Re: [Numpy-discussion] finding index in an array...

2009-06-13 Thread fred
n, that needs to be removed with [0], but > it takes to long now, to remember how to get rid of it. Ok, I get it. Thanks. BTW, I was thinking this was a FAQ and there was a more straightforward answer, or a buitlin function to do the trick... Cheers, -- Fred __

[Numpy-discussion] finding index in an array...

2009-06-12 Thread fred
(without using list, for instance)? TIA. Cheers, -- Fred ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] problems building exported version of numpy from svn

2007-03-21 Thread Fred Romelfanger
em software. I was hoping a newer version of numpy from svn might correct that problem. Thanks -- fred. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] Advice on masked array implementation

2007-02-26 Thread Fred Clare
array and details on the differences between it and numpy.core.ma? Thanks, Fred Clare ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Docstring formatting

2007-02-13 Thread Fred Clare
Sorry for a private e-mail escaping to this list. Fred Clare On Feb 13, 2007, at 4:30 PM, Robert Kern wrote: > Colin J. Williams wrote: > >> Could you give the URL please? > > http://svn.scipy.org/svn/numpy/trunk/numpy/doc/HOWTO_DOCUMENT.txt > > -- > Robert Kern

Re: [Numpy-discussion] Docstring formatting

2007-02-13 Thread Fred Clare
Mary, Do you think we should adopt the "official" SciPy docstring format? It is pretty simple. Did you see Konrad Hinson's comment on NetCDF modules? Fred On Feb 13, 2007, at 4:30 PM, Robert Kern wrote: > Colin J. Williams wrote: > >> Could you give the URL pleas