File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -698,8 +698,11 @@ def isin(
698698    du .validate_usm_type (res_usm_type , allow_none = False )
699699    sycl_dev  =  exec_q .sycl_device 
700700
701-     if  invert  not  in   [True , False ]:
702-         raise  ValueError (f"`invert` must be `True` or `False`, got { invert }  " )
701+     if  not  isinstance (invert , bool ):
702+         raise  TypeError (
703+             "`invert` keyword argument must be of boolean type, " 
704+             f"got { type (invert )}  " 
705+         )
703706
704707    x_dt  =  _get_dtype (x , sycl_dev )
705708    test_dt  =  _get_dtype (test_elements , sycl_dev )
Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ def test_isin_validation():
212212    with  pytest .raises (ExecutionPlacementError ):
213213        dpt .isin (1 , 1 )
214214    not_bool  =  dict ()
215-     with  pytest .raises (ValueError ):
215+     with  pytest .raises (TypeError ):
216216        dpt .isin (dpt .ones ([1 ]), dpt .ones ([1 ]), invert = not_bool )
217217
218218
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments