xtensor
xtensor copied to clipboard
xmasked_view is error
code
xt::xarray<double> a = {{1, 5, 3}, {4, 5, 6}};
xt::xarray<bool> mask = {{true, false, false}, {false, true, false}};
auto m = xt::masked_view(a, mask);
// => m = {{1, masked, masked}, {masked, 5, masked}}
cout << m << endl;
m += 100;
// => a = {{101, 5, 3}, {4, 105, 6}}
cout << a << endl;
answer
{{masked, masked, masked},
{masked, masked, masked}}
{{ 101., 5., 3.},
{ 4., 105., 6.}}
obvious, the answer is not the same with doc in code
has this bug been solved?