Skip to content

rescaleData : workaround np.clip regression since numpy 1.17#1632

Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom
pijyoi:clip_regression
Mar 14, 2021
Merged

rescaleData : workaround np.clip regression since numpy 1.17#1632
j9ac9k merged 1 commit intopyqtgraph:masterfrom
pijyoi:clip_regression

Conversation

@pijyoi
Copy link
Copy Markdown
Contributor

@pijyoi pijyoi commented Mar 14, 2021

NumPy has an open issue where np.clip() has a large performance regression since 1.17 : numpy/numpy#14281
This affects pyqtgraph's rescaleData() and accounts for a large chunk of the time taken for makeARGB().

This PR uses the workaround described in numpy issue above.

Using the "Code to reproduce" example given in #1590, performance improvements of this PR can be observed.

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Mar 14, 2021

Tagging @NilsNemitz as the dynamic rescaling using np.clip as well and is in a fairly performance sensitive codepath.

Thanks for tracking this down @pijyoi This LGTM.

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