[Numpy-svn] [numpy/numpy] 8552cd: BUG: Make nansum work with booleans.

GitHub noreply at github.com
Tue Feb 12 16:48:35 EST 2013


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 8552cd5fcbf52dee79bdade97ca36c18599e64b4
      https://github.com/numpy/numpy/commit/8552cd5fcbf52dee79bdade97ca36c18599e64b4
  Author: Charles Harris <charlesr.harris at 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: b859daed214cbcf9b889713c548733f288a95c56
      https://github.com/numpy/numpy/commit/b859daed214cbcf9b889713c548733f288a95c56
  Author: seberg <sebastian at sipsolutions.net>
  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:
  -----------
  Merge pull request #2979 from charris/fix-nansum

BUG: Make nansum work with booleans.


Compare: https://github.com/numpy/numpy/compare/1ee888709af1...b859daed214c


More information about the Numpy-svn mailing list