join_component_view

glue.core.util.join_component_view(component, view)[source]

Pack a ComponentID and optional view into single tuple.

Returns an object compatible with data.__getitem__ and related methods. Handles edge cases of when view is None, a scalar, a tuple, etc.

Parameters
componentglue.core.component_id.ComponentID

The ComponentID to pack

view

The view into the data, or None