Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
quickthrower2
· 3y ago · 0 comments
And if you use PyTorch, its O(1) operation. You just change how you index into the data.
Comments
[–]
toth
3y ago
I believe numpy introduced ndarrays with user-specified strides, that made this a O(1) operation. Even if not, it certainly predates pytorch in this regard. Pytorch (and other tensor libraries) just used the ndarray concept from numpy.
[–]
quickthrower2
OP
3y ago
Thanks yeah I didn’t mean to imply that Pytorch invented the idea