Identity#
- class astropy.modeling.mappings.Identity(n_inputs, name=None, meta=None)[source]#
Bases:
Mapping
Returns inputs unchanged.
This class is useful in compound models when some of the inputs must be passed unchanged to the next model.
- Parameters:
Examples
Transform
(x, y)
by a shift in x, followed by scaling the two inputs:>>> from astropy.modeling.models import (Polynomial1D, Shift, Scale, ... Identity) >>> model = (Shift(1) & Identity(1)) | Scale(1.2) & Scale(2) >>> model(1,1) (2.4, 2.0) >>> model.inverse(2.4, 2) (1.0, 1.0)
Attributes Summary
Attributes Documentation
- linear = True#