I want to compare a pair of dictionaries and using 'fuzzy' floating point comparison or better yet use `numpy.allclose()` to do so. However, using the default `==` or `!=` in Python for dicts doesn't do this.

I was wondering if there was a way to change the floating point comparison operation (probably using a context manager for safe cleanup).

I believe an example will help here. I have a deeply nested dict that contains all sorts of values. Some of these values are floating point values. I know there are tons of pitfalls for 'comparing' floating point values, etc.

```
d1 = {'a': {'b': 1.123456}}
d2 = {'a': {'b': 1.1234578}}

```

I would like to use `!=` to compare these two dicts and have it return `True` if the only differences are floating point numbers within a certain range. For example, do not count the values different if the are **close** (not sure the precision I want yet).

I suppose I could recursively go through the dicts myself and manually just use `numpy.allclose()` for floating point values and fall back to the normal equality testing for all other types, etc. However, this is a bit tricky and error prone. I do think this would be an acceptable solution, and I'd love to see one like it. Hopefully there is something more elegant though.

The elegant solution in my head would look something like the following. However, I don't know if anything like this is even possible:

```
with hacked_float_compare:
    result = d1 != d2

```

Thus, inside this context manager I would be replacing the floating point comparison (just for standard `float()` values with either my own comparison or `numpy.allclose()`.

Again, I'm not sure this is possible because monkey patching `float()` can't really be done since it's written in `C`. I'd also like to avoid having to change every floating point value in the dicts to my own float class that has a `__eq__()`. Maybe this is the **best** way though?