This now assumes bounds (that seem ok), but it will raise a slightly cryptic exception if the number of bounds is not two:
```ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()``` because you are casting a numpy array to a bool.