[FIX] Support numpy 1.22#5760
Merged
Merged
Conversation
Member
markotoplak
commented
Jan 4, 2022
- np.frompyfunc does convert outputs to the out type anymore
- Adapt a locking test for changed numpy internals
Member
Author
|
@ales-erjavec, could you please review this? It seems that |
Codecov Report
@@ Coverage Diff @@
## master #5760 +/- ##
=======================================
Coverage 86.15% 86.15%
=======================================
Files 315 315
Lines 66186 66195 +9
=======================================
+ Hits 57023 57031 +8
- Misses 9163 9164 +1 |
ales-erjavec
reviewed
Jan 4, 2022
| elif arr.shape != (): # na is an object array | ||
| return na.astype(bool) | ||
| else: # na is not a numpy array | ||
| return na |
Contributor
There was a problem hiding this comment.
Maybe just add casting="unsafe" to __isnastr call? Optionally even check np.can_cast('bool', out.dtype)
This supports numpy 1.22
Member
Author
|
@ales-erjavec, thanks, I did not know about that ufunc argument. I changed added casting="unsafe" to all such calls, so this PR is now very simple. |
3 tasks
markotoplak
added a commit
to markotoplak/orange3
that referenced
this pull request
Jan 7, 2022
[FIX] Support numpy 1.22
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.