[Numpy-discussion] Error in choose (bug?)
jmiller at stsci.edu
Thu May 13 09:58:07 CDT 2004
On Thu, 2004-05-13 at 07:13, Álvaro Tejero Cantero wrote:
> I have a matrix of particle collision times: times[i,j] gives the time
> for particle "i" to collide with particle "j".
> If I do, in order to get the first expected collision time for each
> particle, the following (random array for testing purposes) :
> >>> N=30
> >>> times = rnd.random([N,N])
> >>> choose(argmin(times,transpose(times))
> Segmentation fault (of the python interactive shell!!!)
> With N=100 I get a more informative traceback, and rest within the
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "/usr/lib/python2.3/site-packages/numarray/ufunc.py", line 1670, in choose
> return _choose(selector, population, outarr, clipmode)
> File "/usr/lib/python2.3/site-packages/numarray/ufunc.py", line 1579, in __call__
> result = self._doit(computation_mode, woutarr, cfunc, ufargs, 0)
> File "/usr/lib/python2.3/site-packages/numarray/ufunc.py", line 1564, in _doit
> ValueError: _operator_compute: too many inputs + outputs
> For N=10,N=15 I get the expected output, but for N=20 I get again the
> brutal segfault...
I was able to reproduce this bug, logged it on Source Forge, and will
get to it as soon as possible... probably tomorrow or Monday.
More information about the Numpy-discussion