Commit acfd016
committed
BUG: Fix weird behavior with mask and units (Fixes matplotlib#8908)
Refactor many places that check for masked arrays, and fill the masked
values with nans, with a helper to accomplish that. In the helper,
replace the isinstance check with a attribute check for 'mask'. This
allows libraries, like pint, that wrap mask arrays to pass the check and
be converted appropriately.
Also fix one spot using atleast_1d with _check_1d.1 parent fad6deb commit acfd016
3 files changed
+20
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1966 | 1966 | | |
1967 | 1967 | | |
1968 | 1968 | | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
1969 | 1980 | | |
1970 | 1981 | | |
1971 | 1982 | | |
| |||
2252 | 2263 | | |
2253 | 2264 | | |
2254 | 2265 | | |
2255 | | - | |
| 2266 | + | |
2256 | 2267 | | |
2257 | 2268 | | |
2258 | 2269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
648 | 649 | | |
649 | 650 | | |
650 | 651 | | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
| 652 | + | |
656 | 653 | | |
657 | 654 | | |
658 | 655 | | |
659 | 656 | | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
| 657 | + | |
665 | 658 | | |
666 | 659 | | |
667 | 660 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 133 | + | |
137 | 134 | | |
138 | 135 | | |
139 | 136 | | |
| |||
185 | 182 | | |
186 | 183 | | |
187 | 184 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
| 185 | + | |
193 | 186 | | |
194 | 187 | | |
195 | 188 | | |
| |||
0 commit comments