This function links the user's choice of transformation with its inverse
328659
def itransform_define(transform):
        
        if transform == 'tanh':
            return np.arctanh
        elif transform == 'exp':
            return np.log
        elif transform == 'logit':
            return Family.logit
        elif transform is None:
            return np.array
        else:
            return None
878180
def apply_reverse(
        t: Union[List[List[float]], np.ndarray],
        pos: Tuple[float, float, float],
        with_offsets=True) -> Tuple[float, float, float]:
    
    return apply_transform(inv(t), pos)
569450
def reverse(self):
        
        return Geometry(shapely.ops.transform(lambda x, y: (y, x), self.geometry), crs=self.crs)
1042347
def inverted(self):
        """"""
        # This is a bit of hackery so that we can put a single "inverse"
        # function here. If we just made "self._inverse_type" point to the class
        # in question, it wouldn't be defined yet. This way, it's done at
        # at runtime and we avoid the definition problem. Hackish, but better
        # than repeating code everywhere or making a relatively complex
        # metaclass.
        inverse_type = globals()[self._inverse_type]
        return inverse_type(self._center_longitude, self._center_latitude,
                            self._resolution)
286677
def inverted(self):
        
        out = self.copy()
        out.setInverted(not self.isInverted())
        return out
570513
function inverse(m) {
      var iDet = 1 / determinant(m);
      var a = m[0][0], b = m[0][1], c = m[0][2];
      var d = m[1][0], e = m[1][1], f = m[1][2];
      var g = m[2][0], h = m[2][1], k = m[2][2];
      var Ainv = [
        [(e * k - f * h) * iDet, (c * h - b * k) * iDet,
         (b * f - c * e) * iDet, 0],
        [(f * g - d * k) * iDet, (a * k - c * g) * iDet,
         (c * d - a * f) * iDet, 0],
        [(d * h - e * g) * iDet, (g * b - a * h) * iDet,
         (a * e - b * d) * iDet, 0]
      ];
      var lastRow = [];
      for (var i = 0; i < 3; i++) {
        var val = 0;
        for (var j = 0; j < 3; j++) {
          val += m[3][j] * Ainv[j][i];
        }
        lastRow.push(val);
      }
      lastRow.push(1);
      Ainv.push(lastRow);
      return Ainv;
    }
671127
def _shift_or_mirror_into_invertible_i(self, x, i):
        
        assert x is not None
        lb = self._lb[self._index(i)]
        ub = self._ub[self._index(i)]
        al = self._al[self._index(i)]
        au = self._au[self._index(i)]
        # x is far from the boundary, compared to ub - lb
        if x < lb - 2 * al - (ub - lb) / 2.0 or x > ub + 2 * au + (ub - lb) / 2.0:
            r = 2 * (ub - lb + al + au)  # period
            s = lb - 2 * al - (ub - lb) / 2.0  # start
            x -= r * ((x - s) // r)  # shift
        if x > ub + au:
            x -= 2 * (x - ub - au)
        if x < lb - al:
            x += 2 * (lb - al - x)
        return x
238942
def inverse(self):
        
        return ResizingOperator(domain=self.range, range=self.domain,
                                pad_mode=self.pad_mode,
                                pad_const=self.pad_const)
966539
def transform_fugou(pl, pi, sou, dou, pro, da)
      ret = { "piece" => pi }
      if pl["same"]
        ret["same"] = true
      else
        ret["to"] = pl
      end
      ret["promote"] = (pro == "成") if pro
      if da
        ret["relative"] = "H"
      else
        rel = soutai2relative(sou) + dousa2relative(dou)
        ret["relative"] = rel unless rel.empty?
      end
      ret
    end
814211
function flip(input){
		input = input.reverse();
		
		// Flip any options back into the right order
		for(let i = 0, l = input.length; i < l; ++i){
			const arg = input[i];
			const opt = shortNames[arg] || longNames[arg];
			
			if(opt){
				const from    = Math.max(0, i - opt.arity);
				const to      = i + 1;
				const extract = input.slice(from, to).reverse();
				input.splice(from, extract.length, ...extract);
			}
		}
		
		return input;
	}
228257
def inverse(self):
        
        csg = self.clone()
        map(lambda p: p.flip(), csg.polygons)
        return csg
375305
def inverse(self):
        # type: () -> JonesFaithfulTransformation
        
        Q = np.linalg.inv(self.P)
        return JonesFaithfulTransformation(Q, -np.matmul(Q, self.p))
1057978
def inverse(self):
        
        inv_rot = np.linalg.inv(self.rotation)
        inv_scale = 1.0 / self.scale
        inv_trans = -inv_scale * inv_rot.dot(self.translation)
        return SimilarityTransform(inv_rot, inv_trans, inv_scale,
                                   from_frame=self._to_frame,
                                   to_frame=self._from_frame)
1026561
def transform(function):
        
        def transform_fn(_, result):
            if isinstance(result, Nothing):
                return result

            lgr.debug("Transforming %r with %r", result, function)
            try:
                return function(result)
            except:
                exctype, value, tb = sys.exc_info()
                try:
                    new_exc = StyleFunctionError(function, exctype, value)
                    # Remove the "During handling ..." since we're
                    # reraising with the traceback.
                    new_exc.__cause__ = None
                    six.reraise(StyleFunctionError, new_exc, tb)
                finally:
                    # Remove circular reference.
                    # https://docs.python.org/2/library/sys.html#sys.exc_info
                    del tb
        return transform_fn
2024
def inverse(self):
        """"""
        op = self

        class ShearlabOperatorInverse(odl.Operator):

            """Inverse of the shearlet transform.

            See Also
            --------
            odl.contrib.shearlab.ShearlabOperator
            """

            def __init__(self):
                """Initialize a new instance."""
                self.mutex = op.mutex
                self.shearlet_system = op.shearlet_system
                super(ShearlabOperatorInverse, self).__init__(
                    op.range, op.domain, True)

            def _call(self, x):
                """``self(x)``."""
                with op.mutex:
                    x = np.moveaxis(x, 0, -1)
                    return shearrec2D(x, op.shearlet_system)

            @property
            def adjoint(self):
                """"""
                op = self

                class ShearlabOperatorInverseAdjoint(odl.Operator):

                    """
                    Adjoint of the inverse/Inverse of the adjoint
                    of shearlet transform.

                    See Also
                    --------
                    odl.contrib.shearlab.ShearlabOperator
                    """

                    def __init__(self):
                        """Initialize a new instance."""

                        self.mutex = op.mutex
                        self.shearlet_system = op.shearlet_system
                        super(ShearlabOperatorInverseAdjoint, self).__init__(
                            op.range, op.domain, True)

                    def _call(self, x):
                        """``self(x)``."""
                        with op.mutex:
                            result = shearrecadjoint2D(x, op.shearlet_system)
                            return np.moveaxis(result, -1, 0)

                    @property
                    def adjoint(self):
                        """The adjoint operator."""
                        return op

                    @property
                    def inverse(self):
                        """"""
                        return op.inverse.adjoint

                return ShearlabOperatorInverseAdjoint()

            @property
            def inverse(self):
                """"""
                return op

        return ShearlabOperatorInverse()
1137814
function get_transform()
    {
        $number = "\s*([^,\s]+)\s*";
        $tr_value = "\s*([^,\s]+)\s*";
        $angle = "\s*([^,\s]+(?:deg|rad)?)\s*";

        if (!preg_match_all("/[a-z]+\([^\)]+\)/i", $this->_props["transform"], $parts, PREG_SET_ORDER)) {
            return null;
        }

        $functions = array(
            //"matrix"     => "\($number,$number,$number,$number,$number,$number\)",

            "translate" => "\($tr_value(?:,$tr_value)?\)",
            "translateX" => "\($tr_value\)",
            "translateY" => "\($tr_value\)",

            "scale" => "\($number(?:,$number)?\)",
            "scaleX" => "\($number\)",
            "scaleY" => "\($number\)",

            "rotate" => "\($angle\)",

            "skew" => "\($angle(?:,$angle)?\)",
            "skewX" => "\($angle\)",
            "skewY" => "\($angle\)",
        );

        $transforms = array();

        foreach ($parts as $part) {
            $t = $part[0];

            foreach ($functions as $name => $pattern) {
                if (preg_match("/$name\s*$pattern/i", $t, $matches)) {
                    $values = array_slice($matches, 1);

                    switch ($name) {
                        // <angle> units
                        case "rotate":
                        case "skew":
                        case "skewX":
                        case "skewY":

                            foreach ($values as $i => $value) {
                                if (strpos($value, "rad")) {
                                    $values[$i] = rad2deg(floatval($value));
                                } else {
                                    $values[$i] = floatval($value);
                                }
                            }

                            switch ($name) {
                                case "skew":
                                    if (!isset($values[1])) {
                                        $values[1] = 0;
                                    }
                                    break;
                                case "skewX":
                                    $name = "skew";
                                    $values = array($values[0], 0);
                                    break;
                                case "skewY":
                                    $name = "skew";
                                    $values = array(0, $values[0]);
                                    break;
                            }
                            break;

                        // <translation-value> units
                        case "translate":
                            $values[0] = $this->length_in_pt($values[0], (float)$this->length_in_pt($this->width));

                            if (isset($values[1])) {
                                $values[1] = $this->length_in_pt($values[1], (float)$this->length_in_pt($this->height));
                            } else {
                                $values[1] = 0;
                            }
                            break;

                        case "translateX":
                            $name = "translate";
                            $values = array($this->length_in_pt($values[0], (float)$this->length_in_pt($this->width)), 0);
                            break;

                        case "translateY":
                            $name = "translate";
                            $values = array(0, $this->length_in_pt($values[0], (float)$this->length_in_pt($this->height)));
                            break;

                        // <number> units
                        case "scale":
                            if (!isset($values[1])) {
                                $values[1] = $values[0];
                            }
                            break;

                        case "scaleX":
                            $name = "scale";
                            $values = array($values[0], 1.0);
                            break;

                        case "scaleY":
                            $name = "scale";
                            $values = array(1.0, $values[0]);
                            break;
                    }

                    $transforms[] = array(
                        $name,
                        $values,
                    );
                }
            }
        }

        return $transforms;
    }
890395
def reverse(self):
        
        return BBox((self.min_y, self.min_x, self.max_y, self.max_x), crs=self.crs)