Also, rather than carry the tuple baggage around to deal with later in L221, why not just pull the indices straight out :
```python
stride_inds = np.nonzero(ind_diffs)[0]
```