From: Peter V. <ve...@em...> - 2003-05-06 12:24:32
|
Hi All, I found the following problems after testing my software with numarray 0.= 5: 1) Following works fine if both a and b are arrays: >>> a =3D array([2]) >>> b =3D array([1, 2]) >>> print a + b [3 4] However, if b is an python sequence: >>> a =3D array([2]) >>> b =3D [1, 2] >>> print a + b [3] Apparently broadcasting does not work with python sequeces anymore. This = used=20 to work fine in version 0.4. Is this a bug? 2) It is not possible to compare an array type object to the 'Any' object= : >>> Float64 =3D=3D Any Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.2/site-packages/numarray/numerictypes.py",= line=20 112, in __cmp__ return (genericTypeRank.index(self.name) - ValueError: list.index(x): x not in list I am not sure if this is a bug, or intended behaviour, but the possibilty= to=20 compare an array type object to 'Any' would be very useful for me. 3) The NA_typeNoToTypeObject() function fails if it is called before any=20 arrays are created. It looks to me as if the pNumType array in=20 libnumarraymodule.c is not initialized until an array is created. I don't= =20 know if any other functions are affected in the same way. Could this be=20 fixed? Cheers, Peter --=20 Dr. Peter J. Verveer Cell Biology and Cell Biophysics Programme EMBL Meyerhofstrasse 1 D-69117 Heidelberg Germany Tel. : +49 6221 387245 Fax : +49 6221 387242 Email: Pet...@em... |