[Numpy-svn] [numpy/numpy] 84c52d: BUG: cov/corrcoef complex input and empty arrays

GitHub noreply at github.com
Wed Oct 16 14:55:48 EDT 2013


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 84c52d80b05510e10e730ce9c8c026aadb429594
      https://github.com/numpy/numpy/commit/84c52d80b05510e10e730ce9c8c026aadb429594
  Author: Joseph Martinot-Lagarde <contrebasse at gmail.com>
  Date:   2013-10-16 (Wed, 16 Oct 2013)

  Changed paths:
    M numpy/lib/function_base.py
    M numpy/lib/tests/test_function_base.py

  Log Message:
  -----------
  BUG: cov/corrcoef complex input and empty arrays

This preserves the complex (and higher precision float or
object) type of the input array, so that the complex
covariance and correlation coefficients can be calculated.

It also fixes the the behaviour of empty arrays. These will
now either result in a 0x0 result, or a NxN result filled
with NaNs.

A warning is now issued when ddof is too large and the factor
set to 0 so that in this case the result is always NaN or
infinity/negative infinity and never a negative number.

Closes gh-597 and gh-2680
Closes gh-3882 (original pull request)





More information about the Numpy-svn mailing list