ubermagutil.typesystem#

Typesystem utility.

Classes

Descriptor

Descriptor base class from which all descriptors in ubermagutil.typesystem are derived.

Dictionary

Descriptor allowing setting attributes with a dictionary, which has keys defined by key_descriptor and values defined by value_descriptor.

Name

Python identifier descriptor.

Parameter

Descriptor allowing setting attributes with a value described as descriptor or a dictionary.

Scalar

Descriptor allowing setting attributes only with scalars (numbers.Real).

Subset

Descriptor allowing setting attributes only with a subset of a predefined set.

Typed

Descriptor allowing setting attributes only with values of a certain type.

Vector

Descriptor allowing setting attributes only with vectors (list, tuple, or numpy.ndarray), whose elements are of numbers.Real type.

Functions

typesystem

Decorator for imposing typesystem on a class.