I'd argue it needs changing, but it's your call and I won't lose sleep over it. I just noticed it's not an array. I suppose you could still use ```np.allclose()``` but what wrong with something like:
```python
delta = 0.001
if abs(1.0 - gap / max_step) < delta:
    self.extra_keys['_x_circular'] = True
```
and avoiding the try except completely.