[Numpy-discussion] Bug in numarray<->numpy interaction

Norbert Nemec Norbert.Nemec.list at gmx.de
Sun Dec 24 07:57:25 EST 2006


The following snippet demonstrates a problem in the interaction of
numarray 1.5.2 with numpy 1.0.1 (and older versions):

-------------------
#!/usr/bin/env python

import numarray, numpy

na = numarray.array(0.)
np = numpy.array(0.)

na[...] = np
-------------------

the last linec causes the error
   "TypeError: NA_setFromPythonScalar: bad value type."

The problem occured in a perfectly normal piece of code combining
PyTables (internally based on numarray) with calculations done in NumPy.
AFAICS, it should work but simply is a bug somewhere in numarray or numpy.

Thanks,
Norbert




More information about the NumPy-Discussion mailing list