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 think this is the intended behavior, b[i] is equivalent to b(i), and the behavior when there are less arguments than the number of dimension is to prepend them with 0.
This is required so that (a+b)(i0, ...., iN) = a(i0, ...., iN) + b(i0, ...., iN) is always true, whatever the shapes of a and b are.
But I agree that we should document it. Maybe something symmetric to the cheatsheet, with the differences between numpy and xtensor.
This:
works in numpy, but not in xtensor (because the stride of the first dimension is
0
). We should either fix this, or document it somewhere.The text was updated successfully, but these errors were encountered: