12
12
[0 , - 5 , 10 , - 2.5 , 9.7 ],
13
13
ids = ['0' , '-5' , '10' , '-2.5' , '9.7' ])
14
14
@pytest .mark .parametrize ("stop" ,
15
- [None , 10 , - 2 , 20.5 , 10 ** 5 ],
15
+ [None , 10 , - 2 , 20.5 , 1000 ],
16
16
ids = ['None' , '10' , '-2' , '20.5' , '10**5' ])
17
17
@pytest .mark .parametrize ("step" ,
18
18
[None , 1 , 2.7 , - 1.6 , 100 ],
@@ -26,17 +26,6 @@ def test_arange(start, stop, step, dtype):
26
26
# numpy casts to float32 type when computes float16 data
27
27
rtol_mult = 4
28
28
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
-
40
29
exp_array = numpy .arange (start , stop = stop , step = step , dtype = dtype )
41
30
42
31
dpnp_array = dpnp .arange (start , stop = stop , step = step , dtype = dtype )
0 commit comments