RegisterBooleanType

(function from pyomo.common.numeric_types)

pyomo.common.numeric_types.RegisterBooleanType(new_type: type)[source]

DEPRECATED.

Register the specified type as a “logical type”.

A utility function for registering new types as “native logical types”. Logical types can be leaf nodes in Pyomo logical expressions. The type should be compatible with bool (that is, store a scalar and be castable to a Python bool).

Note that logical types are NOT registered as numeric types.

Parameters:
  • new_type (type) – The new logical type (e.g, numpy.bool_)

  • deprecated: (..) – 6.6.0: The native_boolean_types set (and hence RegisterBooleanType) is deprecated. Users likely should use RegisterLogicalType.