[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

[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

[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

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 array from an

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.4,

[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

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 *

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

[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