[DLMED] use isinstance instead of type
@@ -403,7 +403,7 @@ class CopyItemsd(MapTransform):
for key, new_key in zip(self.keys * self.times, self.names):
if new_key in d:
raise KeyError(f"Key {new_key} already exists in data.")
- if type(d[key]) == torch.Tensor:
+ if isinstance(d[key], torch.Tensor):
d[new_key] = d[key].detach().clone()
else:
d[new_key] = copy.deepcopy(d[key])
