Skip to content

Commit

Permalink
silence warning about transpose
Browse files Browse the repository at this point in the history
  • Loading branch information
davidweichiang committed Sep 12, 2024
1 parent 7da3552 commit 27fdefd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def test_transpose(self):
self.assertTEqual(t.transpose(dim0,dim1).to_dense(),
t.to_dense().transpose(dim0,dim1))
if t.ndim <= 2: self.assertTEqual(t.t().to_dense(), t.to_dense().t())
self.assertTEqual(t.T.to_dense(), t.to_dense().T)
self.assertTEqual(t.T.to_dense(), t.to_dense().permute(*torch.arange(t.ndim - 1, -1, -1)))
self.assertTEqual(t.flatten().to_dense(), t.to_dense().flatten())

def test_reshape(self):
Expand Down

0 comments on commit 27fdefd

Please sign in to comment.