You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was not questioning the output, but with xtensor handling multiple dtypes getting 1. on print would be ideal. Let's make sure that the example prints in the same way as well to avoid any confusions.
It's a small refactor, maybe I can send in my first PR ?
Update std::coutto use setprecision.
Use a floating point number which won't be truncated like 1.5 instead of 1.0.
Use xt::view(arr, 0, 0) for the indexing instead of arr(0, 0). This prints 1. as expected.
Kindly checkout the Index Access example from https://github.com/xtensor-stack/xtensor?tab=readme-ov-file#basic-usage .
Output
1.0 is expected which is correctly shown in the ReadMe output.
I have also run the example on binder jupyter notebook to avoid any discrepancy caused locally.
The text was updated successfully, but these errors were encountered: