Open numpy-gitbot opened 12 years ago
Original ticket http://projects.scipy.org/numpy/ticket/2121 on 2012-04-29 by atmention:charris, assigned to unknown.
Apropos ticket #1952, I don't think it is really fixed. The following should probably raise an error.
In [4]: x = np.array([1, 1, 2]) In [5]: x.var(ddof=10) Out[5]: -0.095238095238095233
The nan for the std is an artifact of taking a square root. Robert, is there any use for negative variance?
For the 1.6.2 backport of #1952 I return nan in these circumstances, but that is a dirty fix.
atmention:rkern wrote on 2012-04-29
No use.
Original ticket http://projects.scipy.org/numpy/ticket/2121 on 2012-04-29 by atmention:charris, assigned to unknown.
Apropos ticket #1952, I don't think it is really fixed. The following should probably raise an error.
The nan for the std is an artifact of taking a square root. Robert, is there any use for negative variance?
For the 1.6.2 backport of #1952 I return nan in these circumstances, but that is a dirty fix.