Only apply nan mask workaround for cp version below 10.0.#2689
Only apply nan mask workaround for cp version below 10.0.#2689j9ac9k merged 3 commits intopyqtgraph:masterfrom
Conversation
|
Right now |
|
Several places in the library do something like: tuple(map(int, cp.__version__.split("."))) < (10, 0) |
|
That is another possibility if preferred. |
|
I would avoid using |
|
I have updated the implementation. |
|
Hi @koenstrien I hope you don't mind, I pushed a commit to your branch removing the import. The reason I did it is I'm about to leave for a vacation for a little over a week, and I wanted to do a new release before I left. I wanted this PR to be in the new release which I'm about to get the ball rolling on. Thanks for the PR! EDIT: whops, I just realized that I never actually submitted the notification to you asking to remove the import, my fault! (I was on mobile, meant to leave a comment on a line, guess it started a review, and when I hit done, it thought I was done w/ the comment but not the review). |
In #1595 a workaround was introduced for masking NaNs in cupy arrays, because the indexing is different than for numpy arrays. As of cupy version 10.0.0 the indexing can be done the same for numpy and cupy arrays again (see cupy PR #6196) and the workaround causes issues. This is solved by only applying the workaround if the cupy version is lower then 10.0.0. In the future the workaround can be moved completely.
Fixes #1595