[Numpy-svn] [numpy/numpy] 4753c1: BUG: Make nansum work with booleans.

GitHub noreply@github....
Tue Feb 26 15:09:42 CST 2013


  Branch: refs/heads/maintenance/1.7.x
  Home:   https://github.com/numpy/numpy
  Commit: 4753c193070ce22c4dc542c089235516b873fa22
      https://github.com/numpy/numpy/commit/4753c193070ce22c4dc542c089235516b873fa22
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2013-02-12 (Tue, 12 Feb 2013)

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

  Log Message:
  -----------
  BUG: Make nansum work with booleans.

This broke when function_base._nannop tried to fill a boolean array with
integer zeros, raising a 'safe_casting' error. It looks like nanargmax and
nanargmin would also break, and were probably incorrect for booleans in any
case. The fix is not to use fill values for boolean and integer dtypes.
Previously that was only done for the integer dtypes.


  Commit: 41920404d010b08dd94162026308b677c195a75b
      https://github.com/numpy/numpy/commit/41920404d010b08dd94162026308b677c195a75b
  Author: njsmith <njs@pobox.com>
  Date:   2013-02-26 (Tue, 26 Feb 2013)

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

  Log Message:
  -----------
  Merge pull request #2982 from charris/backport-fix-nansum

BUG: Make nansum work with booleans.


Compare: https://github.com/numpy/numpy/compare/f7d6f6a647e1...41920404d010


More information about the Numpy-svn mailing list