forked from numpy/numpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API: Disallow strings in logical ufuncs (numpy#21024)
* API: Disallow strings in logical ufuncs This restores pre 1.22 NumPy behaviour for strings passed into logical ufuncs. Logical ufuncs should be able to cast inputs to booleans without modifying their results. Thus they do this now (in NumPy 1.22+). The problem is that string to bool casts are very strange in NumPy currently. This should be reverted/removed once string to bool casts are well defined. But until then, it seems more reasonable to just reject strings. Closes numpygh-20898 Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
- Loading branch information
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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