-
Notifications
You must be signed in to change notification settings - Fork 25k
Closed
Labels
featureA request for a proper, new feature.A request for a proper, new feature.module: numpyRelated to numpy support, and also numpy compatibility of our operatorsRelated to numpy support, and also numpy compatibility of our operatorsmodule: tensor creationtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🐛 Bug
I am trying to reproduce np.linspace() with endpoint=False with torch.linspace() but end up with numerical differences.
To Reproduce
np.linspace(0, 1, 10, endpoint=False) - torch.linspace(0, 1, 10+1).numpy()[:-1]
Expected behavior
I expect the difference to be zero and not around 10e-8.
It would be usefule to also have a endpoint
argument in pytorch
Environment
- PyTorch Version (e.g., 1.0):1.8.1+cu111
- OS (e.g., Linux): LInux
- How you installed PyTorch (
conda
,pip
, source): pip - Build command you used (if compiling from source):
- Python version: 3.8
- CUDA/cuDNN version:11.1
endolith
Metadata
Metadata
Assignees
Labels
featureA request for a proper, new feature.A request for a proper, new feature.module: numpyRelated to numpy support, and also numpy compatibility of our operatorsRelated to numpy support, and also numpy compatibility of our operatorsmodule: tensor creationtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module