Kotlin / multik

Multidimensional array library for Kotlin
https://kotlin.github.io/multik/
Apache License 2.0
646 stars 39 forks source link

Comparison and getting boolean mask #150

Open ashutoshIITK opened 1 year ago

ashutoshIITK commented 1 year ago

I have an NDArray (say idmap1) and would like to compare it with a number to get a boolean mask (numpy boolean style), as shown below:

mask = ((idmap1 == 0) & (idmap2 != 1))
idmap1[mask] = idmap2[mask]

Is there a way to realize this using multik library? Thank you!