Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix errorbar crash on nan values#24823

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

MaximeLucasSky
Copy link

PR Summary

Fixes issue#24818

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (andpytest passes)
  • [N/A] Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • [N/A] New plotting related features are documented with examples.

Release Notes

  • [N/A] New features are marked with a.. versionadded:: directive in the docstring and documented indoc/users/next_whats_new/
  • [N/A] API changes are marked with a.. versionchanged:: directive in the docstring and documented indoc/api/next_api_changes/
  • Release notes conform with instructions innext_whats_new/README.rst ornext_api_changes/README.rst

@MaximeLucasSky
Copy link
Author

MaximeLucasSky commentedDec 27, 2022
edited
Loading

While it does fix the issue, the added test does not pass, because of a Runtime Warning by Numpy :errorbar callsvline on an all-nan array, which causes a warning whennp.nanmax andnp.nanmin are called on it.

I am not sure what is the best way to deal with that : should I prevent the call tonp.nanmin, prevent the call tovline, catch the warning, or live with the warning ?

Copy link

@github-actionsgithub-actionsbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a while, please feel free to ping@matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join uson gitter for real-time discussion.

For details on testing, writing docs, and our review process, please seethe developer guide

We strive to be a welcoming and open project. Please follow ourCode of Conduct.

# and it is not empty
len(err) > 0 and
# and the first element is an array sub-class use
# safe_first_element because getitem is index-first not
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
#safe_first_element because getitem is index-first not
#safe_first_finite because getitem is index-first not

Comment on lines +3523 to +3526
except StopIteration:
# this means we found no finite element, fall back to default
# case.
pass
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

What do you expect to raise this exception? Is it_safe_first_finite?

Copy link
Member

@timhoffmtimhoffmJan 30, 2023
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Should we raise a more telling error in_safe_first_finite? I think a ValueError subclass would make sense here to allow a more specific catching.

@jklymak
Copy link
Member

I've moved to draft, but when updated, we can move back into the queue

@jklymakjklymak marked this pull request as draftJanuary 24, 2023 17:17
@ebrevdo
Copy link

I hit this issue recently and am glad to have found work on the fix. Looking forward to updates; but LMK if I can help.

@rcomer
Copy link
Member

Hi@MaximeLucasSky are you still interested in working on this one?

@rcomer
Copy link
Member

I have proposed a simpler fix for this at#25547.

@rcomer
Copy link
Member

This is now fixed in#25547. Thank you for your work on this@MaximeLucasSky, but we went for a slightly different approach.

@rcomerrcomer closed thisMay 13, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic left review comments

@timhoffmtimhoffmtimhoffm left review comments

@oscargusoscargusoscargus left review comments

@github-actionsgithub-actions[bot]github-actions[bot] left review comments

Assignees
No one assigned
Projects
Status: Waiting for author
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

7 participants
@MaximeLucasSky@jklymak@ebrevdo@rcomer@QuLogic@timhoffm@oscargus

[8]ページ先頭

©2009-2025 Movatter.jp