mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +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
@ -1899,7 +1899,7 @@ class TestReductions(TestCase):
|
||||
# Note [all, any uint8 compatibility]: However for compatibility reason,
|
||||
# for `uint8`, they return Tensor of same dtype `uint8`.
|
||||
# Reference: https://github.com/pytorch/pytorch/pull/47878#issuecomment-747108561
|
||||
exact_dtype = True if dtype != torch.uint8 else False
|
||||
exact_dtype = dtype != torch.uint8
|
||||
|
||||
def _test_all_any(x):
|
||||
self.compare_with_numpy(torch.all, np.all, x)
|
||||
|
Reference in New Issue
Block a user