Return the group L1-norm of ``x``.
434024
def _call(self, x):
        """"""
        # TODO: update when integration operator is in place: issue #440
        pointwise_norm = self.pointwise_norm(x)
        return pointwise_norm.inner(pointwise_norm.space.one())
882113
def j1(x, context=None):
    
    return _apply_function_in_current_context(
        BigFloat,
        mpfr.mpfr_j1,
        (BigFloat._implicit_convert(x),),
        context,
    )
1286767
def dist(x1, x2, axis=0):
    
    return np.linalg.norm(x2 - x1, axis=axis)
193587
def convex_conj(self):
        """"""
        conj_exp = conj_exponent(self.pointwise_norm.exponent)
        return IndicatorGroupL1UnitBall(self.domain, exponent=conj_exp)
1153679
def cnst_A(self, X):
        
        """

        return np.concatenate(
            [sl.Gax(X, ax)[..., np.newaxis] for ax in self.axes] +
            [X[..., np.newaxis],], axis=X.ndim)
397368
def sqr(x, context=None):
    
    return _apply_function_in_current_context(
        BigFloat,
        mpfr.mpfr_sqr,
        (BigFloat._implicit_convert(x),),
        context,
    )
275200
def norm(self, order=2):
        """"""
        return (sum(val**order for val in abs(self).values()))**(1/order)
736270
def get_p_vals(self, X):
		'''
		

		'''
		z_scores = self.get_scores(X[:, 0], X[:, 1])
		return norm.cdf(z_scores)
381957
def mag(z):
    """"""
    if isinstance(z[0], np.ndarray):
        return np.array(list(map(np.linalg.norm, z)))
    else:
        return np.linalg.norm(z)
530537
def layer_norm(x,
               filters=None,
               epsilon=1e-6,
               name=None,
               reuse=None,
               layer_collection=None):
  """"""
  if filters is None:
    filters = shape_list(x)[-1]
  with tf.variable_scope(
      name, default_name="layer_norm", values=[x], reuse=reuse):
    scale, bias = layer_norm_vars(filters)
    return layer_norm_compute(x, epsilon, scale, bias,
                              layer_collection=layer_collection)
178538
def normalize(x):
    ''''''
    x = x.astype(float)
    x -= x.mean()
    return x / float(x.std())
1066554
def proximal(self):
        
        if self.pointwise_norm.exponent == 1:
            return proximal_l1(space=self.domain)
        elif self.pointwise_norm.exponent == 2:
            return proximal_l1_l2(space=self.domain)
        else:
            raise NotImplementedError('`proximal` only implemented for p = 1 '
                                      'or 2')
1030171
def get_group(self, t, i):
        """"""

        try:
            value = []
            if t in _DIGIT and t != '0':
                value.append(t)
                t = next(i)
                if t in _DIGIT:
                    value.append(t)
                else:
                    i.rewind(1)
        except StopIteration:
            pass
        return ''.join(value) if value else None
1118004
def norm(self) -> bk.BKTensor:
        """"""
        return bk.absolute(bk.inner(self.tensor, self.tensor))
616001
def get_norm(self):
        """"""

        return self.x * self.x + self.y * self.y
808732
def normnorm(self):
        

        n = self.norm()
        return V2(-self.y / n, self.x / n)
1053048
def obfn_g1(self, Y1):
        
        """

        return np.linalg.norm((self.Pcn(Y1) - Y1))