AttributeWithInfo#

class glue_qt.viewers.custom.custom_viewer.AttributeWithInfo[source]#

Bases: ndarray

An array subclass wrapping a Component of a dataset It is an array with the following additional attributes: id contains the ComponentID or string name of the Component, and categories is an array or None. For categorical Components, it contains the distinct categories which are integer-encoded in the AttributeWithInfo

Methods Summary

from_layer(layer, cid[, view])

Build an AttributeWithInfo out of a subset or dataset.

make(id, values[, categories])

Methods Documentation

classmethod from_layer(layer, cid, view=None)[source]#

Build an AttributeWithInfo out of a subset or dataset.

Parameters:
layerData or Subset

The data to use

cidComponentID

The ComponentID to use

viewnumpy-style view (optional)

What slice into the data to use

classmethod make(id, values, categories=None)[source]#