-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
plt.bar with nan input fails rendering in notebook using 3.3.0rc1 #17868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I can reproduce this with the current master branch in a jupyter notebook. |
Bisects to 95a530c |
Some more digging, and I think the changes in #16832 are exposing a pre-existing bug in Path(array([[nan, nan],
[nan, nan],
[nan, nan],
[nan, nan],
[nan, nan]]), array([ 1, 2, 2, 2, 79], dtype=uint8)) and it is returning [[nan nan]
[ 0. 0.]] [79 0] which is odd, I would expect it to return something empty since the input was all NaNs. This then propagates to a point where matplotlib complains, because this path does not start with a |
This appears to simply be a missed corner case in my rewrite of |
After some digging: in However, due to the way that Our C++ implementation of if ((code & agg::path_cmd_end_poly) == agg::path_cmd_end_poly) {
continue;
} However, the new As pointed out by David, this is definitely a bug in |
Bug report
Bug summary
A previously-working code (that gets to plot well using other backends or
matplotlib==3.2.2
) fails to render a plot on Jupyter notebook when usingmatplotlib==3.3.0rc1
. This has to do withnp.nan
input toplt.bar
.Code for reproduction
Actual outcome
Expected outcome
3.2.2:

Matplotlib version
print(matplotlib.get_backend())
): 'module://ipykernel.pylab.backend_inline'matplotlib installed using pip
python installed from conda-forge
The text was updated successfully, but these errors were encountered: