pytorch
38d9bb5a - Make PyTorch compilable against upcoming Numpy-2.0 (#121880)

Commit
1 year ago
Make PyTorch compilable against upcoming Numpy-2.0 (#121880) Test plan: ``` % python -c "import torch;import numpy;print(numpy.__version__, torch.tensor(numpy.arange(3, 10)))" 2.1.0.dev0+git20240312.9de8a80 tensor([3, 4, 5, 6, 7, 8, 9]) % python -c "import torch;print(torch.rand(3, 3).numpy())" [[0.0931946 0.44874293 0.8480404 ] [0.93877375 0.10188377 0.67375803] [0.02520031 0.89019287 0.5691561 ]] ``` Fixes https://github.com/pytorch/pytorch/issues/121798 Pull Request resolved: https://github.com/pytorch/pytorch/pull/121880 Approved by: https://github.com/albanD
Author
Committer
Parents
Loading