Why does this piece of code return True when it clearly can be seen that the element [1, 1] is not present in the first array and what am I supposed to change in order to make it return False?
aux = np.asarray([[0, 1], [1, 2], [1, 3]])
np.asarray([1, 1]) in aux
True
==tests don't work reliably on floats. Giving anintexample will probably produce useless answers.inapplied to arrays should behave the same as with lists. Use lists if that's what you want. Otherwise, accept the fact thatnumpyarrays are multidimensional, and implement their own form ofin. Generally though, we don't useinwith arrays. There are better tools that give more control.