Menu

#42 Update operators don't work with mixed-rank expressions

v1.0 (example)
closed
nobody
arrays (15)
5
2018-09-21
2012-05-09
No

If a1 is a 1-dim array and a2 is a 2-dim one, it works fine to do

a2 = a2*a1(tensor::i);

However,

a2 *= a1(tensor::i);

fails with BZ_DEBUG, because the expression is rank1 but is assigned to a rank2 array. I assume that it actually works correctly since the index is used (though I haven't explicitly tested this), so it would be good to figure out how to write the rank test so it doesn't fail.

Discussion

  • Sylwester Arabas

    • status: open --> closed
    • Group: --> v1.0 (example)
     

Log in to post a comment.