Skip to content

Commit 97dce8c

Browse files
authored
Fix to_tensor. (#396)
1 parent ca521c9 commit 97dce8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

segmentation_models_pytorch/losses/_functional.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def to_tensor(x, dtype=None) -> torch.Tensor:
2626
x = x.type(dtype)
2727
return x
2828
if isinstance(x, (list, tuple)):
29-
x = np.ndarray(x)
29+
x = np.array(x)
3030
x = torch.from_numpy(x)
3131
if dtype is not None:
3232
x = x.type(dtype)

0 commit comments

Comments
 (0)