Hide numpy floating point arithmetic warnings

etta-drone
Dan Howe 6 years ago
parent ba31d501f8
commit 5476d4380a

@ -159,9 +159,12 @@ def find_beach_slope(chain_list, z_ave_list, ref_index, check_value):
while i>0 and z_ave_list[i]<check_value+1:
i=i-1
# Hide numpy divide-by-zero warnings
# Hide numpy floating point arithmetic warnings
np.seterr(all='ignore')
slope=(z_ave_list[i]-z_ave_list[ref_index])/(chain_list[i]-chain_list[ref_index])
# Show numpy floating point arithmetic warnings
np.seterr(all=None)

Loading…
Cancel
Save