Or you can fit as few times as possible, but report duplicate points in the output, with something like:
```python
ticks, inverse = np.unique(ticks, return_inverse=True)
...
return np.take(result, inverse)
```