diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2012-11-23 09:33:05 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2012-11-23 10:34:06 -0700 |
commit | 38c150c20fa0b141aa1189b67dbaa781ee90b457 (patch) | |
tree | 65266f8bc0f0894e3e1094cd35d6f4fabb66bf0a /numpy/doc/basics.py | |
parent | 20224ea62ed42a3ebc0795f62b78309ff9ab1a8a (diff) | |
download | numpy-38c150c20fa0b141aa1189b67dbaa781ee90b457.tar.gz |
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.
Diffstat (limited to 'numpy/doc/basics.py')
0 files changed, 0 insertions, 0 deletions