brain-slam / slam

Surface anaLysis And Modeling
MIT License
14 stars 24 forks source link

Numpy runtime warning #37

Closed alexpron closed 3 years ago

alexpron commented 3 years ago

Current behavior of numpy in code is the default one given by np.geterr():

np.geterr()
{'divide': 'warn', 'over': 'warn', 'under': 'ignore', 'invalid': 'warn'}

As a result, a warning is issued when dividing by a zero numpy array. For the decompose_curvature function where the warning occurs, np.artan function handles it correctly, i.e. it results in np.inf array and np.arctan(np.inf) return correct result. Should this behavior be changed in case result is used in other non numpy functions ?