File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -650,19 +650,13 @@ def check_integer_conversion(arr: Array):
650
650
raise TypeError ("Only integer scalar arrays can be converted to a scalar index." )
651
651
652
652
653
- def check_bool_conversion (arr : Array , warn_on_empty = False ):
653
+ def check_bool_conversion (arr : Array ):
654
654
if arr .size == 0 :
655
- if warn_on_empty :
656
- warnings .warn (
657
- "The truth value of an empty array is ambiguous. Returning False. In the future this "
658
- "will result in an error. Use `array.size > 0` to check that an array is not empty." ,
659
- DeprecationWarning , stacklevel = 3 )
660
- else :
661
- raise ValueError ("The truth value of an empty array is ambiguous. Use "
662
- "`array.size > 0` to check that an array is not empty." )
655
+ raise ValueError ("The truth value of an empty array is ambiguous. Use"
656
+ " `array.size > 0` to check that an array is not empty." )
663
657
if arr .size > 1 :
664
- raise ValueError ("The truth value of an array with more than one element is "
665
- " ambiguous. Use a.any() or a.all()" )
658
+ raise ValueError ("The truth value of an array with more than one element"
659
+ " is ambiguous. Use a.any() or a.all()" )
666
660
667
661
668
662
def _aval_property (name ):
You can’t perform that action at this time.
0 commit comments