Unverified Commit 50939b75 authored by moto's avatar moto Committed by GitHub
Browse files

Fix integer division (#714)

parent d2724481
......@@ -381,7 +381,7 @@ def test_mask_along_axis(specgram, mask_param, mask_value, axis):
masked_columns = (mask_specgram == mask_value).sum(other_axis)
num_masked_columns = (masked_columns == mask_specgram.size(other_axis)).sum()
num_masked_columns /= mask_specgram.size(0)
num_masked_columns //= mask_specgram.size(0)
assert mask_specgram.size() == specgram.size()
assert num_masked_columns < mask_param
......
......@@ -1382,7 +1382,7 @@ def _generate_wave_table(
d = (torch.sin(point.to(torch.float64) / table_size * 2 * math.pi) + 1) / 2
elif wave_type == 'TRIANGLE':
d = point.to(torch.float64) * 2 / table_size
value = 4 * point / table_size
value = 4 * point // table_size
d[value == 0] = d[value == 0] + 0.5
d[value == 1] = 1.5 - d[value == 1]
d[value == 2] = 1.5 - d[value == 2]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment