
Stitch-Xiang
@stitch-xiang
281 Following
140 Followers
0 reply
0 recast
0 reaction
0 reply
0 recast
0 reaction
0 reply
0 recast
0 reaction
0 reply
0 recast
0 reaction
The differences between the APIs of numpy, cupy and torch are so fascinating....
```
>>> import torch as np
>>> np.arange(10)
tensor([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> a = np.zeros(20)
>>> a[19:-1:-2] = np.arange(10)
```
Torch doesn't let you have ranges that go backwards 🤣
Would love more consistency 19 replies
425 recasts
2042 reactions
112 replies
379 recasts
2791 reactions
0 reply
0 recast
0 reaction
1 reply
2 recasts
2 reactions
0 reply
0 recast
0 reaction
103 replies
834 recasts
3468 reactions
3 replies
0 recast
2 reactions
40 replies
427 recasts
1952 reactions
0 reply
0 recast
0 reaction
2 replies
0 recast
3 reactions
0 reply
0 recast
0 reaction
0 reply
0 recast
0 reaction
0 reply
0 recast
0 reaction
0 reply
0 recast
0 reaction
0 reply
0 recast
0 reaction
4 replies
0 recast
4 reactions