Identity(n_inputs, name=None, meta=None)¶
Returns inputs unchanged.
This class is useful in compound models when some of the inputs must be passed unchanged to the next model.
n_inputs : int
Specifies the number of inputs this identity model accepts.
name : str, optional
A human-friendly name associated with this model instance (particularly useful for identifying the individual components of a compound model).
meta : dict-like
Free-form metadata to associate with this model.
(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)