CategorySubsetState

class glue.core.subset.CategorySubsetState(att, categories)[source]

Bases: glue.core.subset.SubsetState

A subset defined by the set of categorical values that are equal to a set of categories.

Parameters
attComponentID

The categorical data attribute used for the subset

categoriesiterable

The categories that the attribute should be equal to. These should be given as the integer codes, not the categorical labels.

Attributes Summary

att

The categorical data attribute used for the subset

attributes

The attributes that the subset state depends on.

categories

The categories that the attribute should be equal to.

Methods Summary

copy(self)

Return a copy of the subset state.

to_mask(self, data[, view])

Compute the mask for this subset state.

Attributes Documentation

att

The categorical data attribute used for the subset

attributes

The attributes that the subset state depends on.

categories

The categories that the attribute should be equal to. These should be given as the integer codes, not the categorical labels.

Methods Documentation

copy(self)[source]

Return a copy of the subset state.

to_mask(self, data, view=None)[source]

Compute the mask for this subset state.

Parameters
dataData

The dataset to compute the mask for.

view

Any object that returns a valid view for a Numpy array.