[Numpy-svn] [numpy/numpy] 258fdd: MAINT/BUG: Clip real and imag parts of corrcoef re...

GitHub noreply at github.com
Mon Mar 14 22:11:25 EDT 2016


  Branch: refs/heads/maintenance/1.11.x
  Home:   https://github.com/numpy/numpy
  Commit: 258fdd6ca2d1bdf896341bfabcd30f21b9224116
      https://github.com/numpy/numpy/commit/258fdd6ca2d1bdf896341bfabcd30f21b9224116
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2016-03-14 (Mon, 14 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: 21a2e1f83889e84464a5e3122291a4c24f5ff9c9
      https://github.com/numpy/numpy/commit/21a2e1f83889e84464a5e3122291a4c24f5ff9c9
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2016-03-14 (Mon, 14 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: 8f867e91d7a48043e463b0448f2f58c5032609da
      https://github.com/numpy/numpy/commit/8f867e91d7a48043e463b0448f2f58c5032609da
  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 #7417 from charris/tweak-corrcoef

Backport 7414, Bound result of corrcoef


Compare: https://github.com/numpy/numpy/compare/2252e484f428...8f867e91d7a4


More information about the Numpy-svn mailing list