@@ -1791,29 +1791,14 @@ def test_full_strides():
1791
1791
assert np .array_equal (dpt .asnumpy (X ), Xnp )
1792
1792
1793
1793
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 ):
1804
1796
q = get_queue_or_skip ()
1805
1797
dtype = "i4"
1806
1798
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 )
1814
1799
1815
1800
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 )
1817
1802
1818
1803
1819
1804
@pytest .mark .parametrize (
0 commit comments