|
From: Norbert N. <Nor...@gm...> - 2006-01-20 08:21:09
|
Is it just me who finds this confusing? There is some bug there, but I cannot even say what it is supposed to behave like... --------------------------------- In [1]: import numpy In [2]: numpy.__version__ Out[2]: '0.9.2' In [3]: a = numpy.matrix(numpy.eye(2)) In [4]: a.sum() Out[4]: matrix([[1, 0, 0, 1]]) In [5]: a.A.sum() Out[5]: 2 In [6]: sum(a) Out[6]: matrix([[1, 1]]) In [7]: sum(a.A) Out[7]: array([1, 1]) --------------------------------- |