Skip to content

Fix functions.clip_array()#1649

Merged
j9ac9k merged 2 commits intopyqtgraph:masterfrom
pijyoi:fix_clip_array
Mar 22, 2021
Merged

Fix functions.clip_array()#1649
j9ac9k merged 2 commits intopyqtgraph:masterfrom
pijyoi:fix_clip_array

Conversation

@pijyoi
Copy link
Copy Markdown
Contributor

@pijyoi pijyoi commented Mar 21, 2021

#1641 introduced functions.clip_array().
This PR fixes some defects:

  1. if both vmin and vmax were None, an uninitialized array would be returned
  2. using combination of umath.minimum + umath.maximum benefits only win32 and penalizes other platforms

Development for this PR was done in #1648 where timings before and after this change are recorded.

pijyoi added 2 commits March 22, 2021 05:11
return error for invalid inputs.
use minmax for win32, umath.clip for other platforms

the previous code was penalizing Linux
@j9ac9k j9ac9k merged commit d74bbe3 into pyqtgraph:master Mar 22, 2021
@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Mar 22, 2021

Thanks for the follow up @pijyoi

@pijyoi pijyoi deleted the fix_clip_array branch March 22, 2021 07:59
pijyoi added a commit to pijyoi/pyqtgraph that referenced this pull request Mar 25, 2021
* fix clip_array()

return error for invalid inputs.
use minmax for win32, umath.clip for other platforms

the previous code was penalizing Linux

* force output to be an array
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