Skip to content

Commit

Permalink
(fix) Change default == value to is
Browse files Browse the repository at this point in the history
as the default can be an array. If that is the case the previous
implementation fails in the if clause as the truth value of an
array is ambiguous.
  • Loading branch information
maxmynter committed Mar 28, 2024
1 parent 4de465a commit 30cbdc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nnbench/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _issubtype(t1: type, t2: type) -> bool:
for bm in self.benchmarks:
for var in bm.interface.variables:
name, typ, default = var
if default == empty:
if default is empty:
required.add(name)
if name in params and default != empty:
logger.debug(
Expand Down

0 comments on commit 30cbdc7

Please sign in to comment.