1212 [0 , - 5 , 10 , - 2.5 , 9.7 ],
1313 ids = ['0' , '-5' , '10' , '-2.5' , '9.7' ])
1414@pytest .mark .parametrize ("stop" ,
15- [None , 10 , - 2 , 20.5 , 10 ** 5 ],
15+ [None , 10 , - 2 , 20.5 , 1000 ],
1616 ids = ['None' , '10' , '-2' , '20.5' , '10**5' ])
1717@pytest .mark .parametrize ("step" ,
1818 [None , 1 , 2.7 , - 1.6 , 100 ],
@@ -26,17 +26,6 @@ def test_arange(start, stop, step, dtype):
2626 # numpy casts to float32 type when computes float16 data
2727 rtol_mult = 4
2828
29- # secure there is no 'inf' elements in resulting array
30- max = numpy .finfo (dtype ).max
31- if stop is not None and stop > max :
32- # consider comulative accuracy while generating array
33- # to calculate maximum allowed 'stop' value for dtype=float16
34- arr_len = (max - start ) / (step if step is not None else 1 )
35- arr_ilen = int (arr_len )
36- arr_len = (arr_ilen + 1 ) if float (arr_ilen ) < arr_len else arr_ilen
37- acc = rtol_mult * numpy .finfo (dtype ).eps
38- stop = max - acc * arr_len
39-
4029 exp_array = numpy .arange (start , stop = stop , step = step , dtype = dtype )
4130
4231 dpnp_array = dpnp .arange (start , stop = stop , step = step , dtype = dtype )
0 commit comments