EHN: dealing with /0 without np.nan_to_num