[Numpy-discussion] defmatrix.sum

Stefan van der Walt stefan at sun.ac.za
Tue Jan 9 02:50:54 EST 2007

Hi all,

I noticed that Tim Leslie picked up on the out=None in defmatrix.sum:

    def sum(self, axis=None, dtype=None, out=None):
        """Sum the matrix over the given axis.  If the axis is None, sum
        over all dimensions.  This preserves the orientation of the
        result as a row or column.
        return N.ndarray.sum(self, axis, dtype, out=None)._align(axis)

Surely, that out=None should just be out?  If out is specified, should
sum() still return a value?


More information about the NumPy-Discussion mailing list