[Numpy-svn] [numpy/numpy] fa107f: ENH: Check array dimensionality in cov function.

GitHub noreply at github.com
Mon Mar 14 18:17:58 EDT 2016


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: fa107fe361520ceac09131f96a8715473078801e
      https://github.com/numpy/numpy/commit/fa107fe361520ceac09131f96a8715473078801e
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2016-03-13 (Sun, 13 Mar 2016)

  Changed paths:
    M numpy/lib/function_base.py

  Log Message:
  -----------
  ENH: Check array dimensionality in cov function.

The input arrays are documented to have ndim <=2, so check for that
and raise a ValueError on failure.


  Commit: d92ff4cdd1fc3608e39ffbe119ecbb520b678f3e
      https://github.com/numpy/numpy/commit/d92ff4cdd1fc3608e39ffbe119ecbb520b678f3e
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2016-03-13 (Sun, 13 Mar 2016)

  Changed paths:
    M numpy/lib/function_base.py

  Log Message:
  -----------
  MAINT/BUG: Clip real and imag parts of corrcoef return to [-1, 1].

The non-nan elements of the result of corrcoef should satisfy the
inequality abs(x) <= 1 and the non-nan elements of the diagonal should
be exactly one. We can't guarantee those results due to roundoff, but
clipping the real and imaginary parts to the interval [-1, 1] improves
things to a small degree.

Closes #7392.


  Commit: 204308463955f6604356887e3043743dc163d391
      https://github.com/numpy/numpy/commit/204308463955f6604356887e3043743dc163d391
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2016-03-13 (Sun, 13 Mar 2016)

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

  Log Message:
  -----------
  TST: Check that result of corrcoef are clipped.

This doesn't actually test much, as we don't have any inputs where that
was not already the case. But at least it is there and perhaps a fuzz
test can be added at a later date.


  Commit: 03e772afe1cb0ee8fe6b60cda6265d8f8697def1
      https://github.com/numpy/numpy/commit/03e772afe1cb0ee8fe6b60cda6265d8f8697def1
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2016-03-14 (Mon, 14 Mar 2016)

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

  Log Message:
  -----------
  Merge pull request #7414 from charris/tweak-corrcoef

Tweak corrcoef


Compare: https://github.com/numpy/numpy/compare/160fdf3d96fb...03e772afe1cb


More information about the Numpy-svn mailing list