Re: [Numpy-discussion] how add new attribute to a numpy array object ?

2006-07-23 Thread Filip Wasilewski
On 7/23/06, Eric Firing <[EMAIL PROTECTED]> wrote: > Sebastian Haase wrote: > > Hi, > > I have a (medical) image file. > > I wrote a nice interface based on memmap using numarray. > > The class design I used was essentially to return a numarray array > > object with a new "custom" attribute giving

[Numpy-discussion] A bunch of tickets

2006-07-18 Thread Filip Wasilewski
Hi, I have posted this mail from my google account a while ago, but it obviously was blocked by sourceforge. What about that proposal of moving numpy-discussion to scipy host? Anyway, I have been recently working with arrays of objects and noticed some problems. Here are the tickets: Array impr

[Numpy-discussion] A bunch of tickets

2006-07-18 Thread Filip Wasilewski
Hi, I have been recently working with arrays of objects and noticed some problems. Here are the tickets: Array improperly created from numpy.poly1d object: http://projects.scipy.org/scipy/numpy/ticket/185 Can't create matrix of dtype=object directly from list (problem of ndarray.__new__): http:/

[Numpy-discussion] Array interface and builtin array.array example

2006-07-11 Thread Filip Wasilewski
Hi, the way of accessing data with __array_interface__, as shown by Travis in [1], also works nicely when used with builtin array.array (if someone here is still using it;). Time to convert array.array to ndarray is O(N) but can be made O(1) just by simple subclassing. [1] http://aspn.activestat

Re: [Numpy-discussion] Quicker image transfer, tobuffer?

2006-07-11 Thread Filip Wasilewski
Hi Travis, this is a great example of the __array_interface__ usage. I have spotted some problems after patching the Image.py module and trying to display an array created from Image in matplotlib. First issue is a minor one. There is a difference in axis order between ndarray and PIL: def _co

Re: [Numpy-discussion] Numpy Benchmarking

2006-06-28 Thread Filip Wasilewski
Jens wrote: > Dennis V. Perepelitsa wrote: >>Hi, all. >> >>I've run some benchmarks comparing the performance of scipy, numpy, >>Numeric and numarray vs. MATLAB. There's also the beginnings of a >>benchmark framework included. The results are online at: >> >> http://web.mit.edu/jonas/www/be

Re: [Numpy-discussion] adaptive thresholding: get adacent cells for each pixel

2006-06-10 Thread Filip Wasilewski
Hi, > I'm just starting with numpy (via scipy) and I'm wanting to perform > adaptive thresholding > (http://www.cee.hw.ac.uk/hipr/html/adpthrsh.html) on an image. > Basically that means that I need to get a threshold for each pixel by > examining the pixels around it. In numpy this translates to f

Re: [Numpy-discussion] numpy vs numeric benchmarks

2006-06-02 Thread Filip Wasilewski
Hi, It seems that in Numeric the matrixmultiply is alias for dot function, which "uses the BLAS optimized routines where possible", as the help() says. In NumPy (0.9.6, not upgraded yet to 0.9.8), the matrixmultiply is a function of numpy.core.multiarray, while dot refers to numpy.core._dotblas.