[PYTHON MATRIX-SIG] sum() in 1.0a2
Sun, 18 Aug 1996 11:27:49 -0400
Carlos Fonseca wrote:
> I think sum(a) (and other reductions) should return an array with shape ()
> when a is 1d, and not a scalar. Currently, sum(a).anyarraymethod and
> sum(a) will fail if a is 1d.
Sorry about this, but there has already been much discussion of this
issue and the agreement was that array functions that returns 0d arrays
should return python scalars. I agree that this can occasionally be
confusing, but I think that our conclusion when we last discussed this
was sound (look at the archives if you're feeling brave).
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: firstname.lastname@example.org
administrivia to: email@example.com