On Mon, Apr 16, 2012 at 11:06 PM, Christopher Mutel wrote:
> So, for both 1.5 and 1.6 (at least), it appears that the builtin sum
> does not add ndarrays the way "+" (and operator.add) do:
>
> a = np.arange(10).reshape((2,5))
> b = np.arange(10, 20).reshape((2,5))
> sum(a,b)
> Out[5]:
> array([[15
So, for both 1.5 and 1.6 (at least), it appears that the builtin sum
does not add ndarrays the way "+" (and operator.add) do:
a = np.arange(10).reshape((2,5))
b = np.arange(10, 20).reshape((2,5))
sum(a,b)
Out[5]:
array([[15, 18, 21, 24, 27],
[20, 23, 26, 29, 32]])
a + b
Out[6]:
array([[10,