@@ -1791,29 +1791,14 @@ def test_full_strides():
17911791 assert np .array_equal (dpt .asnumpy (X ), Xnp )
17921792
17931793
1794- def _reduce_to_idtype_range (o , dtype ):
1795- assert isinstance (dtype , np .dtype )
1796- assert dtype .kind in "ui"
1797- _iinfo = np .iinfo (dtype )
1798- _max = _iinfo .max
1799- _min = _iinfo .min
1800- return ((o - _min ) % (1 + _max - _min )) + _min
1801-
1802-
1803- def test_full_gh_1230 ():
1794+ @pytest .mark .parametrize ("dt" , ["i1" , "u1" , "i2" , "u2" , "i4" , "u4" , "i8" , "u8" ])
1795+ def test_full_gh_1230 (dt ):
18041796 q = get_queue_or_skip ()
18051797 dtype = "i4"
18061798 dt_maxint = dpt .iinfo (dtype ).max
1807- X = dpt .full (1 , dt_maxint + 1 , dtype = dtype , sycl_queue = q )
1808- X_np = dpt .asnumpy (X )
1809- assert X .dtype == dpt .dtype (dtype )
1810- expected = np .full_like (
1811- X_np , _reduce_to_idtype_range (dt_maxint + 1 , X .dtype )
1812- )
1813- assert np .array_equal (X_np , expected )
18141799
18151800 with pytest .raises (OverflowError ):
1816- dpt .full (1 , dpt . iinfo ( dpt . uint64 ). max + 1 , sycl_queue = q )
1801+ dpt .full (1 , dt_maxint + 1 , dtype = dtype , sycl_queue = q )
18171802
18181803
18191804@pytest .mark .parametrize (
0 commit comments