[Numpy-svn] [numpy/numpy] 38c150: BUG: gh-2757, masked array var method should zero ...

GitHub noreply at github.com
Sun Nov 25 12:25:08 EST 2012


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 38c150c20fa0b141aa1189b67dbaa781ee90b457
      https://github.com/numpy/numpy/commit/38c150c20fa0b141aa1189b67dbaa781ee90b457
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2012-11-23 (Fri, 23 Nov 2012)

  Changed paths:
    M numpy/ma/core.py

  Log Message:
  -----------
  BUG: gh-2757, masked array var method should zero masked out parameter.

When a is a 1-d masked array with all values masked and b is a 0-d masked
array, then a.var(out=b) fails to set the underlying masked value of b,
causing an invalid value warning to be raised in a.std(out=b) whenever b
contained a masked negative number. This fix sets the underlying value to
0, which is consistent with the n-d case. A better fix might be to add an
out parameter to the masked array ufuncs, but that is a bigger project.


  Commit: 7678c988f88305bfb9be516700e8e05d902f1631
      https://github.com/numpy/numpy/commit/7678c988f88305bfb9be516700e8e05d902f1631
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2012-11-23 (Fri, 23 Nov 2012)

  Changed paths:
    M numpy/ma/tests/test_regression.py

  Log Message:
  -----------
  TST: Add test for gh-2757.


  Commit: 65ed5ebfeac3fb6ff8896bf624e1e08113901b76
      https://github.com/numpy/numpy/commit/65ed5ebfeac3fb6ff8896bf624e1e08113901b76
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2012-11-23 (Fri, 23 Nov 2012)

  Changed paths:
    M numpy/ma/core.py

  Log Message:
  -----------
  MAINT: Avoid unneeded call in masked array std method.

The square root of the variance was taken twice when the out parameter
was specified.


  Commit: 1871820bf16635270a124ba577282ec00cb093a7
      https://github.com/numpy/numpy/commit/1871820bf16635270a124ba577282ec00cb093a7
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2012-11-23 (Fri, 23 Nov 2012)

  Changed paths:
    M numpy/ma/tests/test_core.py

  Log Message:
  -----------
  MAINT: In test_varstd_specialcases out parameters should be 0-d.

The original worked, but that is because the masked array methods
are not properly checking dimensions in this case. That should
also be fixed at some point.


  Commit: 0d593f2aa13ebf865a62a74b9085f554d33b275c
      https://github.com/numpy/numpy/commit/0d593f2aa13ebf865a62a74b9085f554d33b275c
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2012-11-25 (Sun, 25 Nov 2012)

  Changed paths:
    M numpy/ma/core.py
    M numpy/ma/tests/test_core.py
    M numpy/ma/tests/test_regression.py

  Log Message:
  -----------
  Merge pull request #2765 from charris/fix-travis-heisenbug

Fix travis heisenbug


Compare: https://github.com/numpy/numpy/compare/089bfa5865cd...0d593f2aa13e


More information about the Numpy-svn mailing list