code: def _safe_db(num, den):
      
      if den == 0:
          return np.Inf
      return 10 * np.log10(num / den)
docs: Properly handle the potential +Inf db SIR, instead of raising a
      RuntimeWarning. Only denominator is checked because the numerator can never
      be 0.