navis-org / navis

Python library for analysis of neuroanatomical data.
https://navis.readthedocs.io
GNU General Public License v3.0
81 stars 29 forks source link

Avoid potential divide by zero error #118

Closed Robbie1977 closed 1 year ago

Robbie1977 commented 1 year ago

A proposed solution to resolve the divide by zero error I'm occasionally seeing: /var/jenkins_home/.local/lib/python3.9/site-packages/navis/morpho/manipulation.py:1406: RuntimeWarning: divide by zero encountered in true_divide spikes_ix = np.where((dist_AB / dist_AC) > sigma)[0]

schlegelp commented 1 year ago

Thanks, Robbie. This looks good to me!