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
mode – How out-of-bounds indices will be handled. “wrap” - clamps indices to (-n <= i < n), then wraps negative indices. “clip” - clips indices to (0 <= i < n) Default: “wrap”.
This is not the same like numpy handles wrap mode. In numpy it's like
if (ind < 0) {
while (ind < 0) {
ind += max_ind;
}
}
elseif (ind >= max_ind) {
while (ind >= max_ind) {
ind -= max_ind;
}
}
The question here is the described misalignment with numpy is expected or was introduced by a mistake.
The text was updated successfully, but these errors were encountered:
This was an intentional change. The original implementation aligned with Numpy's indices wrapping, but was found to perform poorly.
This style of wrapping is more closely aligned with advanced indexing, which is also why it's the default.
The below example works differently with numpy:
The description for
mode
in dpctl.tensor.put states:This is not the same like numpy handles
wrap
mode. In numpy it's likeThe question here is the described misalignment with numpy is expected or was introduced by a mistake.
The text was updated successfully, but these errors were encountered: