[Numpy-tickets] [NumPy] #638: var should take absolute value for complex numbers.

NumPy numpy-tickets@scipy....
Sun Dec 30 15:37:42 CST 2007


#638: var should take absolute value for complex numbers.
-------------------------+--------------------------------------------------
 Reporter:  akumar       |        Owner:  somebody
     Type:  defect       |       Status:  new     
 Priority:  normal       |    Milestone:  1.0.5   
Component:  numpy.core   |      Version:  none    
 Severity:  normal       |   Resolution:          
 Keywords:  var complex  |  
-------------------------+--------------------------------------------------
Comment (by rkern):

 I honestly don't care about compatibility with Matlab or Octave where I
 think they're wrong.

 Note that the formula given in the Wikipedia article does not match the
 sentence following it. I think the sentence makes more sense than the
 formula. Complex numbers have two components. The appropriate (default)
 measure of spread of a distribution of complex numbers would be an ellipse
 (covariance matrix) rather than a circle (real scalar value). As far as
 statistical distributions are concerned, complex numbers are no different
 than 2-vectors. I need another reference to be convinced otherwise.

 You can use {{{cov()}}} by separating the real and imaginary components.
 {{{cov([z.real, z.imag])}}}.

-- 
Ticket URL: <http://scipy.org/scipy/numpy/ticket/638#comment:7>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list