inaos / iron-array

2 stars 0 forks source link

Allow lazy expression slices in assignments #611

Open FrancescAlted opened 2 years ago

FrancescAlted commented 2 years ago

The same way that lazy expressions are evaluated in getitem contexts like:

res = iarr2[iarr >= 0.5].eval()

the next should be possible too:

iarr2[iarr >= 0.5] = 1

the result will be iarr2 values being 1 when the iarr >= 0.5 condition is fulfilled, and NaNs elsewhere.