[Numpy-discussion] Counting array elements
Chris Barker
Chris.Barker at noaa.gov
Fri Oct 22 11:07:32 EDT 2004
Stephen Walton wrote:
> There is a difference between the sum() Ufunc and the sum() method which
> is not mentioned in the documentation: the function works along an
> axis, while the method works on the whole array. That is, A.sum() and
> A.flat.sum() are equivalent regardless of the rank of A.
Bummer. I was hoping this was a move to a more object-oriented style,
rather than different functionality. Also, it's pretty confusing
terminology, particularly if it's not documented! Why not .SumAll() or
something?
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the NumPy-Discussion
mailing list