Skip to content

Commit

Permalink
Update imports of native_types and pyomo_constant_types in scalin…
Browse files Browse the repository at this point in the history
…g module (IDAES#1366)

* update imports of native_types and pyomo_constant_types (which is deprecated)

* dont check if node is in pyomo_constant_types

* dont import now-unused pyomo_constant_types

---------

Co-authored-by: Ludovico Bianchi <[email protected]>
  • Loading branch information
Robbybp and lbianchi-lbl authored Mar 13, 2024
1 parent fc1a7da commit 38e67db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions idaes/core/util/scaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
from pyomo.dae.flatten import slice_component_along_sets
from pyomo.util.calc_var_value import calculate_variable_from_constraint
from pyomo.core import expr as EXPR
from pyomo.core.expr.numvalue import native_types, pyomo_constant_types
from pyomo.common.numeric_types import native_types
from pyomo.core.base.units_container import _PyomoUnit

import idaes.logger as idaeslog
Expand Down Expand Up @@ -1509,7 +1509,7 @@ def exitNode(self, node, data):
# first check if the node is a leaf
nodetype = type(node)

if nodetype in native_types or nodetype in pyomo_constant_types:
if nodetype in native_types:
return [node]

node_func = self.node_type_method_map.get(nodetype, None)
Expand Down

0 comments on commit 38e67db

Please sign in to comment.