set anisotropic scaling
977495
def d(self,value):
        
        assert value.shape[0]==self.P*self.N, 'd dimension mismatch'
        self._d = value
        self.clear_cache()
284075
public static void scale( double alpha , DMatrix4x4 a ) {
        a.a11 *= alpha; a.a12 *= alpha; a.a13 *= alpha; a.a14 *= alpha;
        a.a21 *= alpha; a.a22 *= alpha; a.a23 *= alpha; a.a24 *= alpha;
        a.a31 *= alpha; a.a32 *= alpha; a.a33 *= alpha; a.a34 *= alpha;
        a.a41 *= alpha; a.a42 *= alpha; a.a43 *= alpha; a.a44 *= alpha;
    }
373638
public Matrix4d scaling(double x, double y, double z) {
        if ((properties & PROPERTY_IDENTITY) == 0)
            identity();
        m00 = x;
        m11 = y;
        m22 = z;
        boolean one = Math.abs(x) == 1.0 && Math.abs(y) == 1.0 && Math.abs(z) == 1.0;
        properties = PROPERTY_AFFINE | (one ? PROPERTY_ORTHONORMAL : 0);
        return this;
    }
593750
private void redrawScale() {
		calculateBestFit(1 / mapPresenter.getViewPort().getResolution());
		scaleBarElement.setInnerText(formatUnits(widthInUnits));
		scaleBarElement.getStyle().setWidth(widthInPixels, Style.Unit.PX);
		getElement().getStyle().setWidth(widthInPixels + 10, Style.Unit.PX);
	}
164410
@Override public void updateScale(float verticalDragOffset) {
    layoutParams.width = (int) (getOriginalWidth() * (1 - verticalDragOffset / getXScaleFactor()));
    layoutParams.height = (int) (getOriginalHeight() * (1 - verticalDragOffset / getYScaleFactor()));

    getView().setLayoutParams(layoutParams);
  }
1226933
def set_initial(self, C_in, scale_in, scale_high):
        """
        self.C_in = C_in
        self.scale_in = scale_in
        self.scale_high = scale_high
478071
def _scale_mesh(self, scale):
        
        pos_ks = ['vertices', 'centers']

        # TODO: scale velocities???

        # handle scale
        self.update_columns_dict({k: self[k]*scale for k in pos_ks})

        self.update_columns(areas=self.areas*(scale**2))
        self._volume *= scale**3
        if self._area is not None:
            # self._area is None for wd meshes
            self._area += scale**2
1269135
def anisotropy(self):
        
        square_diff_energy = 0
        weighted_energy = self.weighted_surface_energy
        area_frac_dict = self.area_fraction_dict
        miller_energy_dict = self.miller_energy_dict

        for hkl in miller_energy_dict.keys():
            square_diff_energy += (miller_energy_dict[hkl] - weighted_energy)\
                                  ** 2 * area_frac_dict[hkl]
        return np.sqrt(square_diff_energy) / weighted_energy
492193
def config_scale(self, cnf={}, **kwargs):
        """"""
        self._scale.config(cnf, **kwargs)
        # Update self._variable limits in case the ones of the scale have changed
        self._variable.configure(high=self._scale['to'],
                                 low=self._scale['from'])
        if 'orient' in cnf or 'orient' in kwargs:
            self._grid_widgets()
1284440
public void scale(double delta, ZoomOption option, Coordinate center) {
		setCurrentScale(viewState.getScale() * delta, option, center);
	}
954618
public void scaleAbsoluteWidth(float newWidth) {
		plainWidth = newWidth;
		float[] matrix = matrix();
		scaledWidth = matrix[DX] - matrix[CX];
		scaledHeight = matrix[DY] - matrix[CY];
		setWidthPercentage(0);
	}
176373
public void setValue(Vector3f scale) {
        mX = scale.x;
        mY = scale.y;
        mZ = scale.z;
    }
354989
def dimensions(self, dims):
        """"""
        nx, ny, nz = dims[0], dims[1], dims[2]
        self.SetDimensions(nx, ny, nz)
        self.Modified()
27429
def scale(self, s=None):
        """"""
        if s is None:
            return np.array(self.GetScale())
        self.SetScale(s)
        return self
660209
public void scaleAbsolute(float newWidth, float newHeight) {
		plainWidth = newWidth;
		plainHeight = newHeight;
		float[] matrix = matrix();
		scaledWidth = matrix[DX] - matrix[CX];
		scaledHeight = matrix[DY] - matrix[CY];
		setWidthPercentage(0);
	}
478756
def scale(self, sx, sy, sz):
        
        mat = numpy.array([
            [sx, 0, 0, 0],
            [0, sy, 0, 0],
            [0, 0, sz, 0],
            [0, 0, 0, 1]
        ])
        self.vectors = self.vectors.dot(mat)
        return self
971519
protected void enlarge( Quadrilateral_F64 corners, double scale ) {

		UtilPolygons2D_F64.center(corners, center);

		extend(center,corners.a,scale);
		extend(center,corners.b,scale);
		extend(center,corners.c,scale);
		extend(center,corners.d,scale);
	}