Skip to content

Commit

Permalink
Let unpack be used for comparison.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gamenot committed Mar 27, 2023
1 parent dfb4717 commit 1ea2611
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion smarts/core/utils/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def unpack(obj):
if isinstance(obj, dict):
return {key: unpack(value) for key, value in obj.items()}
elif isinstance(obj, (list, np.ndarray)):
return [unpack(value) for value in obj]
return tuple(unpack(value) for value in obj)
elif isnamedtupleinstance(obj):
return {key: unpack(value) for key, value in obj._asdict().items()}
elif isdataclass(obj):
Expand Down

0 comments on commit 1ea2611

Please sign in to comment.