Skip to content

Commit de61473

Browse files
committed
remove unused code
1 parent c44c4c0 commit de61473

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

test/test_tensor_creation_ops.py

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2579,7 +2579,7 @@ def test_logspace_vs_numpy(self, device, dtype):
25792579
start = -0.0316082797944545745849609375
25802580
end = .0315315723419189453125
25812581

2582-
for steps in [1, 2, 3, 5, 11, 256, 257, 2 ** 22]:
2582+
for steps in [1, 2, 3, 5, 11, 256, 257, 2**22]:
25832583
t = torch.logspace(start, end, steps, device=device, dtype=dtype)
25842584
a = np.logspace(start, end, steps, dtype=torch_to_numpy_dtype_dict[dtype])
25852585
t = t.cpu()
@@ -2652,10 +2652,6 @@ def _test_signal_window_functions(self, name, dtype, device, **kwargs):
26522652
return
26532653
for size in [0, 1, 2, 5, 10, 50, 100, 1024, 2048]:
26542654
for periodic in [True, False]:
2655-
print(*(kwargs.values()))
2656-
print(size)
2657-
print(periodic)
2658-
26592655
res = torch_method(size, periodic=periodic, **kwargs, device=device, dtype=dtype)
26602656
# NB: scipy always returns a float64 result
26612657
ref = torch.from_numpy(signal.get_window((name, *(kwargs.values())), size, fftbins=periodic))
@@ -2716,26 +2712,6 @@ def test_gaussian_window(self, device, dtype):
27162712
for num_test in range(50):
27172713
self._test_signal_window_functions('gaussian', dtype, device, std=random.random() * 30)
27182714

2719-
# @onlyNativeDeviceTypes
2720-
# @precisionOverride({torch.bfloat16: 5e-2, torch.half: 1e-3})
2721-
# @unittest.skipIf(not TEST_SCIPY, "Scipy not found")
2722-
# @dtypesIfCUDA(torch.float, torch.double, torch.bfloat16, torch.half, torch.long)
2723-
# @dtypes(torch.float, torch.double)
2724-
# def test_dummy(self, device, dtype):
2725-
# from scipy import signal
2726-
#
2727-
# NP2TORCH = {
2728-
# torch.float64: np.float64,
2729-
# torch.float32: np.float32
2730-
# }
2731-
#
2732-
# at = 41
2733-
# window_length = 100
2734-
# w1 = signal.get_window(('chebwin', at), window_length, fftbins=False).astype(NP2TORCH[dtype])
2735-
# # w1 = signal.windows.chebwin(100, 100, sym=True).astype(NP2TORCH[dtype])
2736-
# w2 = torch.signal.windows.chebyshev_window(window_length, at=at, periodic=False, dtype=dtype, device=device)
2737-
#
2738-
# self.assertEqual(w1, w2, exact_dtype=True)
27392715

27402716
def test_tensor_factories_empty(self, device):
27412717
# ensure we can create empty tensors from each factory function

0 commit comments

Comments
 (0)