Commit 6df091f
committed
MNT: explicitly cast np.bool_ -> bool to prevent deprecation warning
This is a workaround to https://bugs.python.org/issue37980
- np.bool raises a warning if you try to use it as an index (by
warning in its `__index__` method
- in py38 python/cpython#11952 python changes
the code path used to convert `np.bool_` -> int for as it is used in
`sorted` so it now goes through the `__index__` code path
- this causes a bunch of spurious warnings to come out of Matplotlib.1 parent b3fadcb commit 6df091f
3 files changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3213 | 3213 | | |
3214 | 3214 | | |
3215 | 3215 | | |
3216 | | - | |
| 3216 | + | |
3217 | 3217 | | |
3218 | 3218 | | |
3219 | 3219 | | |
| |||
3597 | 3597 | | |
3598 | 3598 | | |
3599 | 3599 | | |
3600 | | - | |
| 3600 | + | |
3601 | 3601 | | |
3602 | 3602 | | |
3603 | 3603 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2169 | 2169 | | |
2170 | 2170 | | |
2171 | 2171 | | |
2172 | | - | |
| 2172 | + | |
2173 | 2173 | | |
2174 | 2174 | | |
2175 | 2175 | | |
| |||
2468 | 2468 | | |
2469 | 2469 | | |
2470 | 2470 | | |
2471 | | - | |
| 2471 | + | |
2472 | 2472 | | |
2473 | 2473 | | |
2474 | 2474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
622 | | - | |
| 622 | + | |
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
| |||
0 commit comments