Closed iamthebot closed 6 years ago
The issue is that xt::cast
The fastest solution would be to change the argument so that it reads xt::eval(xt::cast<double>(x))
Or, before calling the function, assigning to a x-container of doubles.
Also, not that the result of the reducers is already promoted to a bigger type. E.g. for float
-> double
, for char
-> long long
etc. (using the rules in xtensor/xutils big_promote_type
.
Hey, I am going to close this issue here, and reopen on xtensor. I think we could/should run xt::eval inside the immediate reducers, to fix this problem!
Attempting to compile the following code results in an error (using xtensor 0.15.9 but the bug was still present when trying against 0.15.2):