@@ -3213,7 +3213,8 @@ def set_xlim(self, left=None, right=None, emit=True, auto=False,
32133213 reverse = left > right
32143214 left , right = self .xaxis .get_major_locator ().nonsingular (left , right )
32153215 left , right = self .xaxis .limit_range_for_scale (left , right )
3216- left , right = sorted ([left , right ], reverse = reverse )
3216+ # cast to bool to avoid bad interaction between python 3.8 and np.bool_
3217+ left , right = sorted ([left , right ], reverse = bool (reverse ))
32173218
32183219 self ._viewLim .intervalx = (left , right )
32193220 if auto is not None :
@@ -3597,7 +3598,8 @@ def set_ylim(self, bottom=None, top=None, emit=True, auto=False,
35973598 reverse = bottom > top
35983599 bottom , top = self .yaxis .get_major_locator ().nonsingular (bottom , top )
35993600 bottom , top = self .yaxis .limit_range_for_scale (bottom , top )
3600- bottom , top = sorted ([bottom , top ], reverse = reverse )
3601+ # cast to bool to avoid bad interaction between python 3.8 and np.bool_
3602+ bottom , top = sorted ([bottom , top ], reverse = bool (reverse ))
36013603
36023604 self ._viewLim .intervaly = (bottom , top )
36033605 if auto is not None :
0 commit comments