Skip to content

keep track of respective finiteness of x and y#2720

Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom
pijyoi:xy-separate-finite
May 16, 2023
Merged

keep track of respective finiteness of x and y#2720
j9ac9k merged 1 commit intopyqtgraph:masterfrom
pijyoi:xy-separate-finite

Conversation

@pijyoi
Copy link
Copy Markdown
Contributor

@pijyoi pijyoi commented May 13, 2023

A common plotting case is when "x" is provided as integers.
This also happens when only "y" is specified, in which case "x" is automatically populated as np.arange(len(y)).

In this case, it is wasteful to check the finiteness of "x".

In implementing this PR, it was found to be more useful to keep track of the finiteness of x and y arrays separately.

integer types are always finite, no need to check

for backwards compatibility, "containsNonfinite" is converted to a
property.
@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented May 16, 2023

Thanks @pijyoi this LGTM. Love the diff; and I agree checking each x and y independently is the way to go.

@j9ac9k j9ac9k merged commit cd11fb3 into pyqtgraph:master May 16, 2023
@pijyoi pijyoi deleted the xy-separate-finite branch May 16, 2023 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants