# [PYTHON MATRIX-SIG] sum() in 1.0a2

**Jim Hugunin
**
hugunin@mit.edu

*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)[0] 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).
-Jim
=================
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================