Numpy replacement?

The about page lists both “A replacement for numpy to use the power of GPUs” as the first thing “one uses PyTorch […] as”, and “Tensor computation (like numpy) with strong GPU acceleration” as the first of its’ two high level features. To what extent is PyTorch planning on replicating the functionality of numpy to these ends? Is it a goal to eventually be able to replace “np.” with “torch.” in many programs and have the benefits of built in GPU acceleration, (in addition to autograd and the rest) or are the statement meant to be more modest, if so why?

I believe torch is a very nice replacement for numpy:

a=np.array(range(0,9999999))
b=np.array([9])

c=a-b :0.02s
same progress in torch: 0.005s

1 Like