oneflow
oneflow copied to clipboard
When nan/inf is a parameter of 'oneflow.arange', there is a core dumped happen, it should add a data type check here
Summary
When nan/inf is a parameter of 'oneflow.arange', there is a core dumped happen. 'numpy.arange' will throw an error.
Code to reproduce bug
import oneflow as flow
import numpy as np
start=0.1
end=float('inf')
step=2
# oneflow
oneflow_range = flow.arange(start, end, step)
print("OneFlow:", oneflow_range)
System Information
- What is your OneFlow installation :dockerhub
- OS:Linux
- OneFlow version (run python3 -m oneflow --doctor):0.9.1.dev20231024+cu117
- Python version: 3.8
when inf is step, there is no core dumped