I'm a beginner using Python and am trying to use the search function in in a dictionary to search for keys that are numpy arrays with the coordinates (2) of a point. So, what I want is: a dictionary whose keys are numpy arrays and whose values are integers. The in operator would be then used to compare for keys using some tolerance measure (numpy.allclose function). I understand that numpy arrays are not hashables so I would have to override the getitem and setitem functions (based on what I found in How to properly subclass dict and override __getitem__ & __setitem__). But how do I make these hashable to add them as keys in the dictionary? How do I override the behaviour of the in operator for this case?
Thanks for the help!