unitaria.util.LogReduceMeta

class unitaria.util.LogReduceMeta(name, bases, ns, *, default=None, **kwargs)[source]

Bases: ABCMeta

Metaclass for simplifying use of nodes implementing binary operations.

This enables syntax like Tensor(A, B, C, D), which is automatically interpreted as Tensor(Tensor(A, B), Tensor(C, D)).

mro()

Return a type’s method resolution order.

register(subclass)

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.