mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Enable all SIM rules except disabled ones (#164645)
`SIM` rules are useful for simplifying boolean expressions and enhances code readability. Pull Request resolved: https://github.com/pytorch/pytorch/pull/164645 Approved by: https://github.com/ezyang, https://github.com/mlazos
This commit is contained in:
committed by
PyTorch MergeBot
parent
f1d882212a
commit
e925dfcc6b
@ -2036,7 +2036,7 @@ class TestIndexing(TestCase):
|
||||
index = torch.tensor([0], device=device)
|
||||
x.index_fill_(1, index, 0)
|
||||
self.assertEqual(x, torch.tensor([[0, 2], [0, 5]], dtype=dtype, device=device))
|
||||
if not x.is_complex() and not device == "meta":
|
||||
if not x.is_complex() and device != "meta":
|
||||
with self.assertRaisesRegex(RuntimeError, r"Scalar"):
|
||||
x.index_fill_(1, index, 1 + 1j)
|
||||
# Make sure that the result stays 0-dim while applied to
|
||||
|
Reference in New Issue
Block a user