[Numpy-discussion] Error in choose (bug?)

Álvaro Tejero Cantero alvaro at antalia.com
Thu May 13 04:07:10 CDT 2004

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


Álvaro Tejero Cantero

http://alqua.org    --	documentos libres
			free documents

More information about the Numpy-discussion mailing list