You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed several issues with tensor.arange found during integration with dpnp
dpt.arange(0, stop=10, step=None) raised, works in numpy
dpt.arange(9.7, stop=10) gave empty array, gives 1 element array in numpy
dpt.arange(0,stop=2, dtype='bool') raised, works in numpy
First two were just bugs, and got fixed.
The last one now works through special-casing bools. It works by
constructing int8 temporary and casting it into bool array only if
the resulting sequence has length 0, 1, or 2.
Aligned with behavior of np.arange in computation of the step.
To this end changed the logic of determining
step argument for the call to `_linspace_step` routine. We now
compute first and second element of the array of given type, and
determine the step as a the difference of these.
To avoid possible overflow message when subtracting unsigned integers,
cast first and second element to int64, subtract, and cast to the
target type.
0 commit comments