[Numpy-svn] [numpy/numpy] 1c2ac8: BUG: Make interp return NaN at NaN interpolation p...

GitHub noreply at github.com
Wed Feb 26 09:45:42 EST 2014


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 1c2ac8fd02cf6db60b2e15ec994b8febe025424a
      https://github.com/numpy/numpy/commit/1c2ac8fd02cf6db60b2e15ec994b8febe025424a
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2014-02-16 (Sun, 16 Feb 2014)

  Changed paths:
    M numpy/lib/src/_compiled_base.c
    M numpy/lib/tests/test_function_base.py

  Log Message:
  -----------
  BUG: Make interp return NaN at NaN interpolation points.

A NaN interpolation point was interpreted as out of bounds on the left
side, hence the value of the left parameter in the function call was
returned.

>>> np.interp(np.nan, [-10, 10], [-2, 2])
-2.0

NaN is a better choice.

Closes #605.


  Commit: 5100498ea6bdb4522b48550aad8841687586095a
      https://github.com/numpy/numpy/commit/5100498ea6bdb4522b48550aad8841687586095a
  Author: seberg <sebastian at sipsolutions.net>
  Date:   2014-02-26 (Wed, 26 Feb 2014)

  Changed paths:
    M numpy/lib/src/_compiled_base.c
    M numpy/lib/tests/test_function_base.py

  Log Message:
  -----------
  Merge pull request #4302 from charris/fix-gh-605

BUG: Make interp return NaN at NaN interpolation points.


Compare: https://github.com/numpy/numpy/compare/8ce3640cb85a...5100498ea6bd


More information about the Numpy-svn mailing list