Re: [Numpy-discussion] putmask/take ?

2006-09-22 Thread PGM
Stefan, Thanks for your suggestions, but that won't do for what I'm working on : I need to get putmask working, or at least knowing it doesnt'. Robert, thanks for your input. The function putmask doesn't work either. Oh, thinking about it: would it be possible to have the same order of arguments

[Numpy-discussion] Putmask/take ?

2006-09-21 Thread PGM
Folks, I'm running into the following problem with putmask on take. >>> import numpy >>> x = N.arange(12.) >>> m = [1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1] >>> i = N.nonzero(m)[0] >>> w = N.array([-1, -2, -3, -4.]) >>> x.putmask(w,m) >>> x.take(i) >>> N.allclose(x.take(i),w) False I'm wondering if

[Numpy-discussion] numpy.fftpack: axis=None ?

2006-09-06 Thread PGM
Folks, I was playing around the numpy.fftpack when I ran into the problem below: it seems that axis=None is not valid with fft. Is there a reason for that ? I was assuming a behavior similar to other functions, where axis=None translates to "use a flat array". ---

[Numpy-discussion] convention in numpy.correlate?

2006-09-06 Thread PGM
Folks, I need to compute some cross-correlations between time series, and I naturally started to use numpy.correlate. Howver, I'm not sure about the convention being used: The crosscorrelation is usually defined as $\gamma_{xy}[k] = \sum_{i}{x[i] y[i+k]}$ So, when I compute >>> numpy.dot(x[:-1]

Re: [Numpy-discussion] A minor annoyance with MA

2006-08-29 Thread PGM
Travis, > This bug has hopefully been fixed (in SVN).Please let us know if it > still persists. It seems to work quite fine with the latest version of ma. Thanks a lot ! P. - Using Tomcat but need to do more? Need to supp

[Numpy-discussion] A minor annoyance with MA

2006-08-28 Thread PGM
Folks, I keep running into the following problem since some recent update (I'm currently running 1.0b3, but the problem occurred roughly around 0.9.8): >>> import numpy.core.ma as MA >>> x=MA.array([[1],[2]],mask=False) >>> x.sum(None) /usr/lib64/python2.4/site-packages/numpy/core/ma.py in reduc

[Numpy-discussion] float64scalar and divmod (and numpy 0.9.8)

2006-07-24 Thread PGM
Folks , I'm still using numpy 0.9.8 and just ran into this problem on my machine (AMD64): >>> import numpy as N >>> x = N.array([1.23456]) >>> print divmod(x,1) (array([ 1.]), array([ 0.23456])) >>> print divmod(x[0],1) () >>> print divmod(x.tolist()[0],1) (1.0, 0.23456001) divmod doesn'