File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 5353import dpnp .backend .extensions .ufunc ._ufunc_impl as ufi
5454from dpnp .dpnp_algo .dpnp_elementwise_common import DPNPBinaryFunc , DPNPUnaryFunc
5555
56+ from .dpnp_array import dpnp_array
5657from .dpnp_utils import get_usm_allocations
5758
5859__all__ = [
@@ -1302,7 +1303,7 @@ def isin(
13021303 )
13031304 usm_element = dpnp .get_usm_ndarray (element )
13041305 usm_test = dpnp .get_usm_ndarray (test_elements )
1305- return dpnp . get_result_array (
1306+ return dpnp_array . _create_from_usm_ndarray (
13061307 dpt .isin (
13071308 usm_element ,
13081309 usm_test ,
Original file line number Diff line number Diff line change 1+ import dpctl
12import numpy
23import pytest
4+ from dpctl .utils import ExecutionPlacementError
35from numpy .testing import (
46 assert_allclose ,
57 assert_array_equal ,
@@ -880,12 +882,18 @@ def test_isin_empty(self):
880882 assert_equal (result , expected )
881883
882884 def test_isin_errors (self ):
883- a = dpnp .arange (5 )
884- b = dpnp .arange (3 )
885+ q1 = dpctl .SyclQueue ()
886+ q2 = dpctl .SyclQueue ()
887+
888+ a = dpnp .arange (5 , sycl_queue = q1 )
889+ b = dpnp .arange (3 , sycl_queue = q2 )
885890
886891 # unsupported type for elements or test_elements
887892 with pytest .raises (TypeError ):
888- dpnp .isin (dict (), b )
893+ dpnp .isin (dict (), a )
889894
890895 with pytest .raises (TypeError ):
891896 dpnp .isin (a , dict ())
897+
898+ with pytest .raises (ExecutionPlacementError ):
899+ dpnp .isin (a , b )
You can’t perform that action at this time.
0 commit comments