[Numpy-discussion] please change mean to use dtype=float

Robert Kern robert.kern at gmail.com
Tue Sep 19 19:18:52 CDT 2006


Sebastian Haase wrote:
> (don't know how to say this for complex types !? Are here real and imag 
> treated separately / independently ?)

Yes. For mean(), there's really no alternative. Scalar variance is not a 
well-defined concept for complex numbers, but treating the real and imaginary 
parts separately is a sensible and (partially) informative thing to do. Simply 
applying the formula for estimating variance for real numbers to complex numbers 
(i.e. change "x" to "z") is a meaningless operation.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco





More information about the Numpy-discussion mailing list