LabelMapper¶
-
class
gwcs.selector.LabelMapper(inputs, mapper, no_label=nan, inputs_mapping=None, name=None, **kwargs)[source]¶ Bases:
gwcs.selector._LabelMapperMaps inputs to regions. Returns the region labels corresponding to the inputs.
Labels are strings or numbers which uniquely identify a location. For example, labels may represent slices of an IFU or names of spherical polygons.
Parameters: mapper :
ModelA function which returns a region.
no_label : str or int
“” or 0 A return value for a location which has no corresponding label.
inputs_mapping :
Mappingor tupleAn optional Mapping model to be prepended to the LabelMapper with the purpose to filter the inputs or change their order. If tuple, a
Mappingmodel will be created from it.name : str
The name of this transform.
Attributes Summary
inputsThe name(s) of the input variable(s) on which a model is evaluated. inputs_mappingmappern_inputsn_outputsno_labelMethods Summary
evaluate(*args)Evaluate the model on some input variables. Attributes Documentation
-
inputs¶ The name(s) of the input variable(s) on which a model is evaluated.
-
inputs_mapping¶
-
mapper¶
-
n_inputs¶
-
n_outputs= 1¶
-
no_label¶
Methods Documentation
-