Re: [Numpy-discussion] howto apply-along-axis?

2013-03-24 Thread Sergio Pascual
This is the closer I got to do what you say http://numpy-discussion.10968.n7.nabble.com/Reductions-with-nditer-working-only-with-the-last-axis-td8157.html Converts a 3D to 2D, but only works in the last axis. Any improvement would be welcomed.ç 2013/3/22 Neal Becker > I frequently find I ha

Re: [Numpy-discussion] Reductions with nditer working only with the last axis

2012-10-01 Thread Sergio Pascual
42 45] [48 51 54 57]] nditer_fun(data, [-1, 0, 1]) [[58 58 58 58] [58 58 58 58] [58 58 58 58]] Only along the last axis both functions give the same result 2012/10/1 Han Genuit : > On Thu, Sep 27, 2012 at 6:08 PM, Sergio Pascual > wrote: >> Hello, I'm trying to understand h

[Numpy-discussion] Reductions with nditer working only with the last axis

2012-09-27 Thread Sergio Pascual
Hello, I'm trying to understand how to work with nditer to do a reduction, in my case converting a 3d array into a 2d array. I followed the help here http://docs.scipy.org/doc/numpy/reference/arrays.nditer.html and managed to create a function that applies reduction over the last axis of the input

[Numpy-discussion] Iterating over a given axis with buffering

2012-08-13 Thread Sergio Pascual
Hi, I have a 3d array of bitswapped data, dimensions 2000x2000x20. I want to apply a function over the third axis to obtain a 2000x2000 array. This is what numpy.apply_along_axis does, but I need a faster version, so I'm writing it in C. I started by writing a generic ufunc version of the code. It

[Numpy-discussion] Limit in NpyIter_MultiNew: NPY_MAXARGS

2012-08-11 Thread Sergio Pascual
I have written a program that makes use of NpyIter_Multi to iterate simultaneously over a large number of 2d arrays. But I have noticed that there is a limit of 32 in the number of simultaneous iterators allowed. This number is NPY_MAXARGS. I typically need to iterate over hundreds of images. So,

Re: [Numpy-discussion] problem installing numpy on Fedora

2011-04-13 Thread Sergio Pascual
You should check if you have two different compilers installed ls /usr/bin/gcc* ? 2011/4/13 c cook : > I have Fedora Core 3 and x86_64 architecture. But I don't understand why it > appears to look for /usr/lib/gcc/x86_64-redhat-linux/3.4.4/ > instead of /usr/bin/gcc > Csaba > > On Wed, Apr 13, 20

Re: [Numpy-discussion] Extending numpy statistics functions (like mean)

2011-04-11 Thread Sergio Pascual
1, 2011 at 2:36 PM, Sergio Pascual > wrote: >> Hi list. >> >> For mi application, I would like to implement some new statistics >> functions over numpy arrays, such as truncated mean. Ideally this new >> function should have the same arguments >> than numpy.

[Numpy-discussion] Extending numpy statistics functions (like mean)

2011-04-11 Thread Sergio Pascual
Hi list. For mi application, I would like to implement some new statistics functions over numpy arrays, such as truncated mean. Ideally this new function should have the same arguments than numpy.mean: axis, dtype and out. Is there a way of writing this function that doesn't imply writing it in C