Refit (normalize) the attribute.
        @param a: An attribute.
        @type a: L{Attribute}
971273
def refitAddr(self, a):
        
        if a.prefix is not None:
            ns = a.namespace()
            if self.permit(ns):
                a.prefix = self.prefixes[ns[1]]
        self.refitValue(a)
457400
public static void changeSign( DMatrix5 a )
    {
        a.a1 = -a.a1;
        a.a2 = -a.a2;
        a.a3 = -a.a3;
        a.a4 = -a.a4;
        a.a5 = -a.a5;
    }
434682
def _updateA(X, A, R, P, Z, lmbdaA, orthogonalize):
    """"""
    n, rank = A.shape
    F = zeros((n, rank), dtype=A.dtype)
    E = zeros((rank, rank), dtype=A.dtype)

    AtA = dot(A.T, A)

    for i in range(len(X)):
        F += X[i].dot(dot(A, R[i].T)) + X[i].T.dot(dot(A, R[i]))
        E += dot(R[i], dot(AtA, R[i].T)) + dot(R[i].T, dot(AtA, R[i]))

    # regularization
    I = lmbdaA * eye(rank, dtype=A.dtype)

    # attributes
    for i in range(len(Z)):
        F += P[i].dot(Z[i].T)
        E += dot(Z[i], Z[i].T)

    # finally compute update for A
    A = solve(I + E.T, F.T).T
    return orth(A) if orthogonalize else A
1131321
def _renumber(a: np.ndarray, keys: np.ndarray, values: np.ndarray) -> np.ndarray:
	
	ordering = np.argsort(keys)
	keys = keys[ordering]
	values = keys[ordering]
	index = np.digitize(a.ravel(), keys, right=True)
	return(values[index].reshape(a.shape))
782991
def normalize_UNTL(subject):
    """"""
    subject = subject.strip()
    subject = re.sub(r'[\s]+', ' ', subject)
    return subject
252782
def transform(self, attrs):
        """"""
        self.collect(attrs)
        self.add_missing_implementations()
        self.fill_attrs(attrs)
243923
def rec_setattr(obj, attr, value):
    
    attrs = attr.split('.')
    setattr(reduce(getattr, attrs[:-1], obj), attrs[-1], value)
72175
def rebin(a, newshape):
    
        
    shape = a.shape

    lenShape = len(shape)

    factor = np.asarray(shape)/np.asarray(newshape)
    #print factor

    evList = ['a.reshape('] + \
             ['newshape[%d],factor[%d],'%(i,i) for i in xrange(lenShape)] + \
             [')'] + ['.sum(%d)'%(i+1) for i in xrange(lenShape)] + \
             ['/factor[%d]'%i for i in xrange(lenShape)]

    return eval(''.join(evList))
1033114
public static void changeSign( DMatrix6 a )
    {
        a.a1 = -a.a1;
        a.a2 = -a.a2;
        a.a3 = -a.a3;
        a.a4 = -a.a4;
        a.a5 = -a.a5;
        a.a6 = -a.a6;
    }
1369009
function normalize(obj, caseType = 'camel') {
  let ret = obj;
  const method = methods[caseType];

  if (Array.isArray(obj)) {
    ret = [];
    let i = 0;

    while (i < obj.length) {
      ret.push(normalize(obj[i], caseType));
      ++i;
    }
  } else if (isPlainObject(obj)) {
    ret = {};
    // eslint-disable-next-line guard-for-in, no-restricted-syntax
    for (const k in obj) {
      ret[method(k)] = normalize(obj[k], caseType);
    }
  }

  return ret;
}
256028
public static float normalizeAngle (float a) {
        while (a < -FloatMath.PI) {
            a += TWO_PI;
        }
        while (a >= FloatMath.PI) {
            a -= TWO_PI;
        }
        return a;
    }
169752
def MoveToAttribute(self, name):
        
        ret = libxml2mod.xmlTextReaderMoveToAttribute(self._o, name)
        return ret
263567
def reduce_l2(attrs, inputs, proto_obj):
    """"""
    new_attrs = translation_utils._fix_attribute_names(attrs, {'axes':'axis'})
    return 'norm', new_attrs, inputs
1192763
public String normalizeAttribute(String name) {
        name = name.trim();
        if (!preserveAttributeCase)
            name = lowerCase(name);
        return name;
    }
662634
def _wrap_attribute(self, attr):
        """"""
        if not attr:
            const = const_factory(attr)
            const.parent = self
            return const
        return attr
472375
public static void scale( double alpha , DMatrix6x6 a ) {
        a.a11 *= alpha; a.a12 *= alpha; a.a13 *= alpha; a.a14 *= alpha; a.a15 *= alpha; a.a16 *= alpha;
        a.a21 *= alpha; a.a22 *= alpha; a.a23 *= alpha; a.a24 *= alpha; a.a25 *= alpha; a.a26 *= alpha;
        a.a31 *= alpha; a.a32 *= alpha; a.a33 *= alpha; a.a34 *= alpha; a.a35 *= alpha; a.a36 *= alpha;
        a.a41 *= alpha; a.a42 *= alpha; a.a43 *= alpha; a.a44 *= alpha; a.a45 *= alpha; a.a46 *= alpha;
        a.a51 *= alpha; a.a52 *= alpha; a.a53 *= alpha; a.a54 *= alpha; a.a55 *= alpha; a.a56 *= alpha;
        a.a61 *= alpha; a.a62 *= alpha; a.a63 *= alpha; a.a64 *= alpha; a.a65 *= alpha; a.a66 *= alpha;
    }
1074429
function createNormalizedNormalAttribute(normal) {
      if (cachedData.attributes.has(normal)) {
        return cachedData.attributes.get(normal);
      }

      var attribute = normal.clone();

      var v = new THREE.Vector3();

      for (var i = 0, il = attribute.count; i < il; i++) {
        v.fromArray(attribute.array, i * 3);

        if (v.x === 0 && v.y === 0 && v.z === 0) {
          // if values can't be normalized set (1, 0, 0)
          v.setX(1.0);
        } else {
          v.normalize();
        }

        v.toArray(attribute.array, i * 3);
      }

      cachedData.attributes.set(normal, attribute);

      return attribute;
    }