Cleanup converter docs and StrCategoryConverter behavior#29059
Merged
ksunden merged 1 commit intomatplotlib:mainfrom Nov 1, 2024
Merged
Cleanup converter docs and StrCategoryConverter behavior#29059ksunden merged 1 commit intomatplotlib:mainfrom
ksunden merged 1 commit intomatplotlib:mainfrom
Conversation
- Use getter in docs
- Use a single instance of StrCategoryConverter for all types
- avoids warning since some methods convert to `np.str_` and others are
just `str`, which previously got separate instances
- added test
QuLogic
approved these changes
Oct 31, 2024
Member
|
What happens if folks try to plot strings of three different types on the same axis? (Or is that equivalent to the methods converting internally to different string types?) |
Member
Author
|
It is equivalent, we just had different instances for no real reason, as the converter instance is portable between types. we do a single instance for the various date types which work similarly. |
Member
cause I copy pasted from how dates did it 😅 |
story645
approved these changes
Nov 1, 2024
story645
reviewed
Nov 1, 2024
| ax.plot(['a', 'b', 'd'], ['f', 'a', 'b']) | ||
| ax.bar(['b', 'c', 'd'], ['g', 'e', 'd']) | ||
| axis_test(ax.xaxis, ['a', 'b', 'd', 'c']) | ||
| axis_test(ax.yaxis, ['e', 'g', 'f', 'a', 'b', 'd']) |
Member
There was a problem hiding this comment.
b doesn't end up on the yaxis so I don't think this test should pass?
story645
approved these changes
Nov 1, 2024
Member
Author
|
doc failure is #29058 |
Member
Author
|
Failures are unrelated, merging so I can get 3.10 out since we have two approvals Appveyor was the stochastic test_determinism timeout error |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
np.str_and others arejust
str, which previously got separate instancesPR summary
PR checklist