Davis Vaughan

Results 726 comments of Davis Vaughan

The new equality you show above looks correct to me!

I think `eye()` needs an order/layout template parameter as well, as `numpy.eye()` has an `order = 'C'` argument. I'm fairly certain that's the fix here. https://docs.scipy.org/doc/numpy/reference/generated/numpy.eye.html

I think I did try `Shield()` and some `PROTECT` things as well and didn't have any luck. Hopefully you can fix it with the xexpression assignment! Not a problem about...

I'll see if I can simplify further. I'm aware of the painful speed loss from calling back to R from cpp, but think that the flexibility might be nice for...

You mean like this? ```cpp // [[Rcpp::depends(xtensorrr)]] // [[Rcpp::plugins(cpp14)]] #include #include #include #include #include using namespace Rcpp; // Assume we take in doubles and return doubles // [[Rcpp::export]] SEXP custom_reducer_impl(SEXP...

I've used a lambda instead of the separate functor idea, but I think the same idea is still holding

There was one other idea I wanted to try. By-passing `Rcpp::Function` and using the bare bones C interface way to call the R function using `Rf_eval()`. The `purrr` package uses...

> immediate_evaluation mode I'll check that out! Thanks!

Debugging this a little more just to try and narrow in on the issue. Here are a few simpler variations: 1) `custom_reducer_impl_simple` - The functor returns `1`, assign straight to...

I'm still having the error, but custom reducers are low on my priority list right now, and probably won't make it into the first version of rray. That said, if...