Skip to content

Commit

Permalink
Add str type annotation to device parameter in ToTensorD (#6737)
Browse files Browse the repository at this point in the history
### Description

A simple fix adding `str` type annotation to the `device` parameter in
`ToTensorD`, making it consistent with `ToTensor`. As this fix is very
simple, I hope it's okay I don't create an issue in advance.

Signed-off-by: function2 <function2-llx@outlook.com>
  • Loading branch information
function2-llx authored Jul 18, 2023
1 parent 38d73e8 commit b8c3e86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion monai/transforms/utility/dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ def __init__(
self,
keys: KeysCollection,
dtype: torch.dtype | None = None,
device: torch.device | None = None,
device: torch.device | str | None = None,
wrap_sequence: bool = True,
track_meta: bool | None = None,
allow_missing_keys: bool = False,
Expand Down

0 comments on commit b8c3e86

Please sign in to comment.