diff --git a/nielsen_volumes.py b/nielsen_volumes.py index 858ac58..5f918e1 100644 --- a/nielsen_volumes.py +++ b/nielsen_volumes.py @@ -132,7 +132,9 @@ def findZerochainage(chainage0, elevation0, max_beach_slope=5, min_beach_slope=5 else: #find the slope between the last two points try: + np.seterr(all='ignore') beachslope = 1/((elevation0[-2] - elevation0[-1])/(chainage0[-1] - chainage0[-2])) + np.seterr(all=None) except ZeroDivisionError: beachslope= 999 if beachslope>min_beach_slope: