[Numpy-discussion] Conversion from Numeric to numarray

Francesc Alted falted at openlc.org
Tue Dec 16 02:02:05 CST 2003


Conversion between Numeric arrays and numarray fails for zero-sized Numeric

>>> numarray.array(Numeric.zeros((0,), 'd'))
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.3/site-packages/numarray/numarraycore.py", line 
301, in array
    raise ValueError("Unknown input type")
ValueError: Unknown input type

but this works:

>>> numarray.array(Numeric.zeros((1,), 'd'))
array([ 0.])

I'm wondering if it would be better to log a bug of the SF project site for
such a no too grave bugs rather than report them to the list, although it
seems to me that people only logs Numeric reports on the SF project. Would
it be correct using the same place for numarray reports as well?


Francesc Alted

More information about the Numpy-discussion mailing list