Re: [Rcpp-devel] Code review for xtensor R bindings

2017-06-07 Thread Wolf Vollprecht
The idea with IntegerVector for shape is great. I had to fix some minor stuff in xtensor but it appears to be working. Ok, good to know about the shape copy! Yeah, this is literally a weekend project for now (and I haven't used R before) so this was just a quick-n-dirty test script. Cheers, Wol

Re: [Rcpp-devel] Code review for xtensor R bindings

2017-06-07 Thread Dirk Eddelbuettel
On 7 June 2017 at 09:29, Romain Francois wrote: | Hi, | | Instead of doing that: | | const int vtype = traits::r_sexptype_traits::rtype; | SEXP shape_sxp = Rf_allocVector(vtype, shape.size()); | | Perhaps your rxarray object could hold an IntegerVector. Also not quite sure | why you use the f

Re: [Rcpp-devel] Code review for xtensor R bindings

2017-06-07 Thread Romain Francois
Hi, Instead of doing that: const int vtype = traits::r_sexptype_traits::rtype; SEXP shape_sxp = Rf_allocVector(vtype, shape.size()); Perhaps your rxarray object could hold an IntegerVector. Also not quite sure why you use the first line at all, which does not depend on T, so vtype is always