mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix unused Python variables in test/[e-z]* (#136964)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/136964 Approved by: https://github.com/justinchuby, https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
d298bd840f
commit
d8c8ba2440
@ -74,7 +74,7 @@ def _generate_input(shape, dtype, device, with_extremal):
|
||||
# TODO: replace this with make_tensor() in common_utils.py
|
||||
def _rand_shape(dim, min_size, max_size):
|
||||
shape = []
|
||||
for i in range(dim):
|
||||
for _ in range(dim):
|
||||
shape.append(random.randint(min_size, max_size))
|
||||
return tuple(shape)
|
||||
|
||||
@ -1546,7 +1546,7 @@ class TestOldViewOps(TestCase):
|
||||
def _test_atleast_dim(self, torch_fn, np_fn, device, dtype):
|
||||
for ndims in range(0, 5):
|
||||
shape = _rand_shape(ndims, min_size=5, max_size=10)
|
||||
for n in range(ndims + 1):
|
||||
for _ in range(ndims + 1):
|
||||
for with_extremal in [False, True]:
|
||||
for contiguous in [False, True]:
|
||||
# Generate Input.
|
||||
|
Reference in New Issue
Block a user