Re: [Numpy-discussion] numpy FFT memory accumulation

2007-11-01 Thread Ray S
At 09:00 AM 11/1/2007, you wrote: I saw that Numeric did also (I still use Numeric for smaller array speed) but much more slowly. I will try to repeat with a small demo and post. It turns out to be some aspect of mixing numpy and Numeric; the attached *Stable.py files allocate memory that stays

Re: [Numpy-discussion] numpy FFT memory accumulation

2007-11-01 Thread Ray S
At 09:00 AM 11/1/2007, Chuck wrote: In Python, collections.deque makes a pretty good circular buffer. Numpy will make an array out of it, which involves a copy, but it might be better than what you are doing now. hmmm, I'll think more about that - and the copy is only at program start, it seem

[Numpy-discussion] numpy FFT memory accumulation

2007-10-31 Thread Ray S
I am using fftRes = abs(fft.rfft(data_array[end-2**15:end])) to do running analysis on streaming data. The N never changes. It sucks memory up at ~1MB/sec with 70kHz data rate and 290 ffts/sec. (Interestingly, Numeric FFT accumulates much slower..) (Commenting out that one line stops memory growth.

[Numpy-discussion] numpy version and numpy.asarray behavior issue

2007-10-29 Thread Ray S
I just installed 1.0.3.1 on top of Enthought's and asarray() works. But... Although the creation of an array from an address via a Dummy class is kosher in one process (as in the previous attachment), it fails across processes - the array is created, but gives a "Python has generated errors" w

[Numpy-discussion] numpy version and numpy.asarray behavior issue

2007-10-29 Thread Ray S
I have 2 PCs with 2 different installs: ActivePython 2.4.3 Build 12 with numpy version '1.0b1' and Enthought 2.4.3 (1.0.0 #69) with numpy version '0.9.7.2476' The attached runs Ok on numpy v1.0, but on Enthought's, print a1[0] gives: IndexError: 0-d arrays can't be indexed. It seems that the

Re: [Numpy-discussion] numpy/Windows shared arrays between processes?

2007-10-10 Thread Ray S
Thanks all: At 10:00 AM 10/10/2007, Robert Kern wrote: >Something like the following should suffice (untested, though I've >done similar things with ctypes before): I tested, successfully: """ nFromAddress.py """ def fromaddress(address, dtype, shape, strides=None): """ Create a numpy arr

Re: [Numpy-discussion] numpy/Windows shared arrays between processes? CODE...

2007-10-09 Thread Ray S
# numpyShared.py import numpy as N def arrSharedMemory(shape, dtype, tag="PySharedMemory", access=None): """ Windows only ! share memory between different processes if same `tag` is used. """ itemsize = N.dtype(dtype).itemsize count = N.product(shape) size = cou

Re: [Numpy-discussion] numpy/Windows shared arrays between processes?

2007-10-09 Thread Ray S
On 10/9/07, Sebastian Haase replied: > > Did you find that locks > > or semaphores were needed? > Maybe that's why it crashed ;-) !? But for simple use it seems fine. I just did some code (below) that does read/write to the array AFAP, and there is no crash, or any other issue (Win2000, py2.

[Numpy-discussion] numpy/Windows shared arrays between processes?

2007-10-08 Thread Ray S
Is anyone sharing arrays between processes on Windows? I tried compiling the posh sources (once, so far) with the new MS toolkit and failed... What other solutions are in use? Have a second process create an array view from an address would suffice for this particular purpose. I could pass the a

Re: [Numpy-discussion] numpy array sharing between processes? (and ctypes)

2007-05-14 Thread Ray S
While investigating ctypes and numpy for sharing, I saw that the example on http://www.scipy.org/Cookbook/Ctypes#head-7def99d882618b52956c6334e08e085e297cb0c6 does not quite work. However, with numpy.version.version=='1.0b1', ActivePython 2.4.3 Build 12: import numpy as N from ctypes import * x

Re: [Numpy-discussion] Big list of Numpy & Scipy users

2007-04-05 Thread Ray S
How's this, for under Applications? CV-mini The CV-mini is a signal analyzer written in Python, NumPy, and wxPython. It is a high-speed, general-purpose, multi-channel FFT instrument available in 3 versions (so far). Link: http://cognitivevision.com/CVmini.htm Which reminds me, we should add P

Re: [Numpy-discussion] zoom FFT with numpy? (Nadav Horesh)

2007-03-15 Thread Ray S
"Charles R Harris" wrote: >BTW, did the s/n you gave refer to the signal or to it's transform? That is the time domain s/n, approximately... Thanks to all for the replies, some digestion is needed. Ray ___ Numpy-discussion mailing list Numpy-discus

Re: [Numpy-discussion] zoom FFT with numpy? (Nadav Horesh)

2007-03-15 Thread Ray S
Hi Nadev, >A long time ago I translated a free code of chirp z transform (zoom fft) >into python. Thanks, I'll try it out. I did, however read before on the differences: From Numerix http://www.numerix-dsp.com/zoomfft.html: "One common question is : Is the zoom FFT the same as the chirp z-tr

[Numpy-discussion] zoom FFT with numpy?

2007-03-14 Thread Ray S
We'd like to do what most call a "zoom FFT"; we only are interested in the frequencies of say, 6kHZ to 9kHz with a given N, and so the computations from DC to 6kHz are wasted CPU time. Can this be done without additional numpy pre-filtering computations? If explicit filtering is needed to "base