(function from pyomo.common.numeric_types)
pyomo.common.numeric_types
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).
complex
Note that complex types are NOT registered as logical or numeric types.
new_type (type) – The new complex type (e.g, numpy.complex128)