[Matrix-SIG] bug in array constructor for type 'O'

Charles G Waldman cgw@fnal.gov
Thu, 16 Dec 1999 13:14:34 -0600 (CST)

Just noticed this:

>>> a=array(["foo","bar","baz"])
>>> a
array([[f, o, o],
       [b, a, r],
       [b, a, z]],'c')

This is slightly odd, but I can rationalize it, since each of the
strings "looks like" an array of characters.

But if I try to force the arraytype to "O" (Python Object)
I get:

>>> a=array(["foo","bar","baz"],'O')
>>> a
array([[foo , foo , foo ],
       [bar , bar , bar ],
       [baz , baz , baz ]],'O')

This just looks like a bug.