Fix subslice optimization for long, fully nan lines. by anntzer · Pull Request #25978 · matplotlib/matplotlib
The subslice optimizer does not handle the case of fully nan inputs, so the relevant check in recache() is not whether x is sorted but really whether x is sorted and not fully nan. Fix that. Previously, `plt.plot([np.nan] * 2000, range(2000))` would crash.
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request
May 30, 2023oscargus added a commit that referenced this pull request
Jun 1, 2023…978-on-v3.7.x Backport PR #25978 on branch v3.7.x (Fix subslice optimization for long, fully nan lines.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters