ElementSubsetState

class glue.core.subset.ElementSubsetState(indices=None, data=None)[source]

Bases: glue.core.subset.SubsetState

A subset defined by a set of indices to apply to the data.

Parameters
indices

Any valid object that can be used to index a Numpy array.

dataData

The data in whose space the indices are defined.

Attributes Summary

attributes

The attributes that the subset state depends on.

data

The UUID of the data in whose space the indices are defined.

indices

The indices which when applied to the data give the subset.

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

attributes[source]

The attributes that the subset state depends on.

data[source]

The UUID of the data in whose space the indices are defined.

indices[source]

The indices which when applied to the data give the subset.

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.