-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] Support numpy 1.22 #5760
[FIX] Support numpy 1.22 #5760
Conversation
markotoplak
commented
Jan 4, 2022
- np.frompyfunc does convert outputs to the out type anymore
- Adapt a locking test for changed numpy internals
@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 |
Orange/data/io_util.py
Outdated
elif arr.shape != (): # na is an object array | ||
return na.astype(bool) | ||
else: # na is not a numpy array | ||
return na |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just add casting="unsafe"
to __isnastr
call? Optionally even check np.can_cast('bool', out.dtype)
This supports numpy 1.22
@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. |
[FIX] Support numpy 1.22