It would need to have the same shape though, e.g. be `np.ones_like(k)` or similar depending on what `k` actually is (list, float, ndarray).  In that respect, as `_hard_cutoff` currently handles those differences re-using it here avoids duplication.  I'd just suggest changing `1.e30` to either `sys.float_info.max` (having done an `import sys` somewhere above) or `float("inf")`, which will also work:
```
>>> sys.float_info.max < float("inf")
True
```