(x, mu=255.0)
return out
A numpy implementation of inverse Mu-Law.

  Args:
    x: The Mu-Law samples to decode.
    mu: The Mu we used to encode these samples.

  Returns:
    out: The decoded data.
A numpy implementation of inverse Mu-Law.
A numpy implementation of inverse Mu - Law .
def inv_mu_law_numpy(x, mu=255.0):
  """A numpy implementation of inverse Mu-Law.

  Args:
    x: The Mu-Law samples to decode.
    mu: The Mu we used to encode these samples.

  Returns:
    out: The decoded data.
  """
  x = np.array(x).astype(np.float32)
  out = (x + 0.5) * 2. / (mu + 1)
  out = np.sign(out) / mu * ((1 + mu)**np.abs(out) - 1)
  out = np.where(np.equal(x, 0), x, out)
  return out
def inv_mu_law_numpy ( x , mu = 255.0 ) : x = np . array ( x ) . astype ( np . float32 ) out = ( x + 0.5 ) * 2. / ( mu + 1 ) out = np . sign ( out ) / mu * ( ( 1 + mu ) ** np . abs ( out ) - 1 ) out = np . where ( np . equal ( x , 0 ) , x , out ) return out