On 12/24/06, Norbert Nemec <[EMAIL PROTECTED]> wrote:

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.


Recent versions of PyTables work fine with numpy. Unless you have old tables
using the numarray flavor I suggest making the change. It is probably
possible to read the numarray data into numpy by specifying a particular
flavor in the read statement, but Francesc could probably tell you more
about that.

Chuck
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to