Skip to content

Commit

Permalink
Use callable to test callable
Browse files Browse the repository at this point in the history
  • Loading branch information
gramalingam committed Dec 23, 2024
1 parent 834815b commit 9a4a58e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onnxscript/rewriter/_ir_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def is_singleton_value(
scalar = get_singleton_value(val)
if scalar is None:
return False
if isinstance(expected, Callable):
if callable(expected):
return expected(scalar)
if isinstance(expected, int):
return expected == scalar
Expand Down

0 comments on commit 9a4a58e

Please sign in to comment.