Skip to content

Commit

Permalink
Fix pylint error.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shyue Ping Ong committed May 8, 2023
1 parent 1ef039d commit 7b6182c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion monty/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ def process_decoded(self, d):
return cls_(**d)
elif torch is not None and modname == "torch" and classname == "Tensor":
if "Complex" in d["dtype"]:
return torch.tensor(
return torch.tensor( # pylint: disable=E1101
[np.array(r) + np.array(i) * 1j for r, i in zip(*d["data"])],
).type(d["dtype"])
return torch.tensor(d["data"]).type(d["dtype"]) # pylint: disable=E1101
Expand Down

0 comments on commit 7b6182c

Please sign in to comment.