Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lostella committed Dec 4, 2024
1 parent 662415b commit cc82c83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ def test_pad_and_stack(tensors: list):

ref = torch.concat(tensors).to(dtype=stacked_and_padded.dtype)

assert torch.sum(stacked_and_padded) == torch.sum(ref)
assert torch.sum(torch.nan_to_num(stacked_and_padded, nan=0)) == torch.sum(ref)
assert torch.nanmean(stacked_and_padded) == torch.nanmean(ref)

0 comments on commit cc82c83

Please sign in to comment.