I am trying to find an index value of certain array values in an xarray. I have an xarray called lattice filled that contains numbers 1 through n and what I would like is something like
auto x2 = xt::where(lattice == i)
to get the index values of element i in lattice that will be used for a distance function, but I get the message that == doesn't match the operands. The problem doesn't happen when I use > so I'm just wondering what the difference is.
I've used np.where(lattice==i) in python and I'm trying to translate it over.