pyphi.models.cmp#

Utilities for comparing phi-objects.

Module attributes

EQUALITY_TOLERANCE

Tolerance for structural equality on IIT quantities.

Functions

numpy_aware_eq(a, b)

Return whether two objects are equal via recursion, with float leaves compared up to EQUALITY_TOLERANCE.

sametype(func)

Method decorator to return NotImplemented if the args of the wrapped method are of different types.

Classes

Orderable()

Base mixin for implementing rich object comparisons on phi-objects.

OrderableByPhi()

Mixin for implementing rich object comparisons on phi-objects that are ordered solely by their phi values.