Tolerate an empty BarGraphItem#2658
Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom Apr 13, 2023
Merged
Conversation
Sometimes, it is useful to be able to create an empty BarGraphItem
to be populated later using setOpts, like
bg = pg.BarGraphItem(
x0=[], height=[], y0=[], width=[],
pen=...,
brush=...
)
Avoid NumPy ValueError when computing np.max/min from and empty array
in this case.
Contributor
|
In a way, this fixes a regression of #2599. Firstly, it has never been possible to create What is currently possible is to create a single zero area rectangle |
12 tasks
Member
|
Hi @jmakovicka This PR LGTM, sorry it took so long before someone chimed in. Merging! |
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.
Sometimes, it is useful to be able to create an empty BarGraphItem to be populated later using setOpts, like
bg = pg.BarGraphItem(
x0=[], height=[], y0=[], width=[],
pen=...,
brush=...
)
Avoid NumPy ValueError when computing np.max/min from and empty array in this case.
Detail the reasoning behind the code change. If there is an associated issue that this PR will resolve add
Fixes #
Other Tasks
Bump Dependency Versions
Files that need updates
Confirm the following files have been either updated or there has been a determination that no update is needed.
README.mdsetup.pytox.ini.github/workflows/main.ymland associatedrequirements.txtand condaenvironemt.ymlfilespyproject.tomlbinder/requirements.txtPre-Release Checklist
Pre Release Checklist
__init__.pyCHANGELOGprimarily using contents from automated changelog generation in GitHub release pagePost-Release Checklist
Steps To Complete
.dev0to__version__in__init__.py