

@classmethod
def from_layer(cls, layer, cid, view=None):
    '\n        Build an AttributeInfo out of a subset or dataset\n\n        Parameters\n        ----------\n        layer : :class:`~glue.core.data.Data` or :class:`~glue.core.subset.Subset`\n            The data to use\n        cid : ComponentID\n            The ComponentID to use\n        view : numpy-style view (optional)\n            What slice into the data to use\n        '
    values = layer[(cid, view)]
    comp = layer.data.get_component(cid)
    categories = None
    if comp.categorical:
        categories = comp.categories
    return cls.make(cid, values, comp, categories)

dataset/ETHPy150Open glue-viz/glue/glue/viewers/custom/qt/custom_viewer.py AttributeInfo.from_layer/original