We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Consider this:
a = af.constant(0., d0=3, d1=3) a[1,1] = 1.
This one makes the whole second row into 2s: a[a>0.] = 2. While pavanky's trick gives the correct result:
a[a>0.] = 2.
cond = a>0 a = a*(1-cond)+cond*2.
Update: this also gives wrong results: a[af.algorithm.where(a>0.)] = 2.
a[af.algorithm.where(a>0.)] = 2.