From: Travis O. <oli...@ie...> - 2001-08-03 01:10:56
|
On Fri, 03 Aug 2001, Nathaniel Gray wrote: > Hi everybody, > > I'm using Python 2.1.1 and Numpy 20.1.0 This seems to be a problem: > > Python 2.1.1 (#2, Jul 31 2001, 14:10:42) > [GCC 2.96 20000731 (Linux-Mandrake 8.0 2.96-0.48mdk)] on linux2 > Type "copyright", "credits" or "license" for more information. > > >>> from Numeric import * > >>> from MLab import zeros > >>> joe = zeros(3,'l',1) > >>> fred = array([1,2,3],'l') > >>> joe += fred > > Traceback (most recent call last): > File "<stdin>", line 1, in ? > TypeError: return array has incorrect type > > This fails whether or not fred has the spacesaver flag set. > > This, however, works fine: > >>> joe = zeros(3, 'l') > >>> fred = array([1,2,3], 'l') > >>> joe += fred > >>> joe > > array([1, 2, 3]) > > Am I doing something wrong or is this a bug? > > Please CC to me since I'm not subscribed to the list. > Thanks a lot! > -Nathan Thanks for the bug report, Nathan. It was indeed a bug, which I hope has now been squashed in the latest CVS version of Numeric. Thanks for your help. Travis |