@classmethod
    def from_layer(cls, layer, cid, view=None):
        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)
Test the get_error of BaseErrorMeasure for the initialization exception.
dataset/ETHPy150Open glue-viz/glue/glue/viewers/custom/qt/custom_viewer.py/AttributeInfo.from_layer--crossover with--dataset/ETHPy150Open T-002/pycast/pycast/tests/errormeasuretest.py/BaseErrorMeasureTest.get_error_initialization_test