[Numpy-discussion] Bug in piecewise?

2007-10-19 Thread Geoffrey Zhu
Hi All, If I execute the following code, I find that function f() sometimes is called with an empty array. I am not sure why this is necessary. Is this a bug? def f(x): return x**2 return numpy.piecewise(u, abs(u)<1, [f, 0]) Thanks, Geoffrey ___ Num

Re: [Numpy-discussion] Sum of the product of three or more arrays

2007-10-19 Thread Geoffrey Zhu
On 10/18/07, Robert Kern <[EMAIL PROTECTED]> wrote: > Geoffrey Zhu wrote: > > Hi All, > > > > Given three vectors of the same lengths, X, Y, and Z, I am looking for > > an efficient way to calculate the following: > > > > sum(x[i]*y[i]*z[i], for i=1..n ) > > (x*y*z).sum() > > -- > Robert Kern > > "

Re: [Numpy-discussion] NumPy 1.0.4 release

2007-10-19 Thread Lisandro Dalcin
On 10/19/07, David Cournapeau <[EMAIL PROTECTED]> wrote: > numpy.scons branch > > This is a much more massive change. Scons itself adds something like 350 > kb to a bzip tarball. If numpy build system will not depend on scons (is this right?) then .. Is it strictly needed to distribute scons with

Re: [Numpy-discussion] Error in deallocation ?

2007-10-19 Thread Matthieu Brucher
Oups, sorry for the sending twice, we have some problem with our DNS in Strasbourg :( 2007/10/19, Matthieu Brucher <[EMAIL PROTECTED]>: > > Here is an excerpt of the stack on the numpy svn of wednesday : > > #0 0x4402 in __kernel_vsyscall () > #1 0x00b8e382 in [EMAIL PROTECTED] () from /lib/

Re: [Numpy-discussion] Error in deallocation ?

2007-10-19 Thread Matthieu Brucher
Here is an excerpt of the stack on the numpy svn of wednesday : #0 0x4402 in __kernel_vsyscall () #1 0x00b8e382 in [EMAIL PROTECTED] () from /lib/libpthread.so.0 #2 0x080fe5b7 in PyThread_release_lock (lock=0x80d0fb2) at Python/thread_pthread.h:374 #3 0x080d0fb2 in PyEval_SaveThread () at

Re: [Numpy-discussion] Error in deallocation ?

2007-10-19 Thread Matthieu Brucher
Here is an excerpt of the stack on the numpy svn of wednesday : #0 0x4402 in __kernel_vsyscall () #1 0x00b8e382 in [EMAIL PROTECTED] () from /lib/libpthread.so.0 #2 0x080fe5b7 in PyThread_release_lock (lock=0x80d0fb2) at Python/thread_pthread.h:374 #3 0x080d0fb2 in PyEval_SaveThread () at

[Numpy-discussion] Support universal gfortran compiler on OS X

2007-10-19 Thread Jarrod Millman
Hello, Could someone confirm whether this ticket can be closed: http://projects.scipy.org/scipy/numpy/ticket/571 Thanks, -- Jarrod Millman Computational Infrastructure for Research Labs 10 Giannini Hall, UC Berkeley phone: 510.643.4014 http://cirl.berkeley.edu/ _