Bases: astropy.modeling.Model
Allows inputs to be reordered, duplicated or dropped.
| Parameters: | mapping : tuple
n_inputs : int
name : str, optional
meta : dict-like
|
|---|---|
| Raises: | TypeError
|
Examples
>>> from astropy.modeling.models import Polynomial2D, Shift, Mapping
>>> poly1 = Polynomial2D(1, c0_0=1, c1_0=2, c0_1=3)
>>> poly2 = Polynomial2D(1, c0_0=1, c1_0=2.4, c0_1=2.1)
>>> model = (Shift(1) & Shift(2)) | Mapping((0, 1, 0, 1)) | (poly1 & poly2)
>>> model(1, 2)
(17.0, 14.2)
Attributes Summary
| inputs | The name(s) of the input variable(s) on which a model is evaluated. |
| inverse | A Mapping representing the inverse of the current mapping. |
| mapping | Integers representing indices of the inputs. |
| outputs | The name(s) of the output(s) of the model. |
Methods Summary
| eval(*args, **kwargs) | Deprecated since version 1.0. |
| evaluate(*args) | Evaluate the model on some input variables. |
Attributes Documentation
The name(s) of the input variable(s) on which a model is evaluated.
A Mapping representing the inverse of the current mapping.
| Raises: | `NotImplementedError`
|
|---|
Integers representing indices of the inputs.
The name(s) of the output(s) of the model.
Methods Documentation
Deprecated since version 1.0: The eval function is deprecated and may be removed in a future version. Use Mapping.evaluate instead.
Evaluate the model on some input variables.