Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Commitd91d216
committed
BUG: ensure that errorbar does not error on masked negative errors.
errorbar checks that errors are not negative, but a bit convolutedly,in order to avoid triggering on nan. Unfortunately, the work-aroundfor nan means that possible masks get discarded, and hence passing ina masked error array that has a negative but masked value leads toan exception. This PR solves that by simply combining the test fornegative values with the indirect isnan test (err == err), so thatif a masked array is passed, the test values are masked and ignoredin the check.As a bonus, this also means that astropy's ``Masked`` arrays can nowbe used -- those refuse to write output of tests to unmasked valuessince that would discard the mask (which is indeed the underlyingproblem here).1 parentd55bdde commitd91d216
2 files changed
+14
-2
lines changedLines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3756 | 3756 |
| |
3757 | 3757 |
| |
3758 | 3758 |
| |
3759 |
| - | |
3760 |
| - | |
| 3759 | + | |
3761 | 3760 |
| |
3762 | 3761 |
| |
3763 | 3762 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4538 | 4538 |
| |
4539 | 4539 |
| |
4540 | 4540 |
| |
| 4541 | + | |
| 4542 | + | |
| 4543 | + | |
| 4544 | + | |
| 4545 | + | |
| 4546 | + | |
| 4547 | + | |
| 4548 | + | |
| 4549 | + | |
| 4550 | + | |
| 4551 | + | |
| 4552 | + | |
| 4553 | + | |
4541 | 4554 |
| |
4542 | 4555 |
| |
4543 | 4556 |
| |
|
0 commit comments
Comments
(0)