[Numpy-discussion] Numeric/numpy incompatibility

Andrew Straw strawman at astraw.com
Mon Aug 28 15:15:40 CDT 2006


The following code indicates there is a problem adding a numpy scalar
type to a Numeric array. Is this expected behavior or is there a bug
somewhere?

This bit me in the context of updating some of my code to numpy, while
part of it still uses Numeric.

import Numeric
import numpy

print 'Numeric.__version__',Numeric.__version__
print 'numpy.__version__',numpy.__version__

a = Numeric.zeros( (10,2), Numeric.Float )
b = numpy.float64(23.39)
a[0,1] = a[0,1] + b
assert a[0,1]==b





More information about the Numpy-discussion mailing list