Ask any question about QuantStack projects: xtensor, xeus, voila, Jupyter widgets, mamba
#define xtensor pytensor
for fun gives a segmentation fault, becausedim == 2
??
#define xtensor pytensor
and xt::xtensor<size_t, 2>
#define
then it works fine.
Another one... bool
handling is wonky in general, this one doesn't need xsimd
either. https://godbolt.org/z/bhh7Kfcen
Remove the true &&
to make it work.
true && (xt::view(a, 1) < 0.0)
, you create an unevaluated xfunction
that cannot be cast to a bool
true && (xt::view(a, 1) < 0.0)()
xfunction
and an xexpression
?
xexpression
is a CRTP base class of xfunction
auto diff = xt::view(in1, xt::all(), xt::newaxis(), xt::all())
- xt::view(in2, xt::newaxis(), xt::all(), xt::all());
xt::view(state.pairwise_distance, xt::all(), xt::all())
= xt::sqrt(xt::sum(diff * diff, { 2 }));