import tensorflow as tf

  A tensor.
  """
  zero = _to_tensor(0., x.dtype.base_dtype)
  inf = _to_tensor(np.inf, x.dtype.base_dtype)
  x = tf.clip_by_value(x, zero, inf)
  return tf.sqrt(x)


def var(x, axis=None, keepdims=False):
  """Variance of a tensor, alongside the specified axis.
