dfalbel / torch

torch from R!
http://dfalbel.github.io/torch
Other
51 stars 5 forks source link

dim #2

Closed dfalbel closed 5 years ago

dfalbel commented 5 years ago

In some tensor methods we use negative dim to indicate that we won't use the argument. The problem is that negative indices can be used to express reverse index like (-1) will use the last dimension.

We need to find a way to pass a NULL value and decide which tensor method to use inside the cpp code.

dfalbel commented 5 years ago

It can be solved by using: Rcpp::Nullable<Rcpp::IntegerVector>