mlverse / torch

R Interface to Torch
https://torch.mlverse.org
Other
490 stars 64 forks source link

docs: correct wrong information about indexing #1087

Closed sebffischer closed 1 year ago

sebffischer commented 1 year ago

The docs also show it, but here is a similar example as well:

library(torch)
#> Warning: package 'torch' was built under R version 4.3.0
x = torch_ones(10)
x = x$reshape(c(2, 5))

x[1]
#> torch_tensor
#>  1
#>  1
#>  1
#>  1
#>  1
#> [ CPUFloatType{5} ]

Created on 2023-08-10 with reprex v2.0.2