RegisterComplexType
(function from pyomo.common.numeric_types)
- pyomo.common.numeric_types.RegisterComplexType(new_type: type)[source]
Register the specified type as an “complex type”.
A utility function for registering new types as “native complex types”. Complex types can NOT be leaf nodes in Pyomo numeric expressions. The type should be compatible with
complex(that is, store a scalar complex value and be castable to a Python complex).Note that complex types are NOT registered as logical or numeric types.
- Parameters:
new_type (type) – The new complex type (e.g, numpy.complex128)