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
Indexing the first dimension with af::array and the second dimension with af::seq ignores the step parameter of the af::seq. Casting the af::seq to af::array is a workaround for this issue.
Minimal example:
#include<arrayfire.h>intmain() {
af::info();
af::array A = af::seq(10);
A = A.T();
af::print("A", A);
af::array selector_x = af::constant(0, 1);
af::seq selector_y(0, 9, 2); // select every second element// af::array selector_y = af::seq(0, 9, 2); // this is a workaroundaf::print("A select", A(selector_x, selector_y));
}
Indexing the first dimension with
af::array
and the second dimension withaf::seq
ignores thestep
parameter of theaf::seq
. Casting theaf::seq
toaf::array
is a workaround for this issue.Minimal example:
Output:
Expected behavior (also the workaround behavior) would be that
A select
is equal to:Arrayfire version:
The text was updated successfully, but these errors were encountered: