We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51e8a0c commit 88d51d2Copy full SHA for 88d51d2
test/test_ops.py
@@ -1268,6 +1268,10 @@ def test_encode_to_tensor_long_output(self):
1268
torch.testing.assert_close(self.decode(encoded_tensor), samples)
1269
1270
def test_contiguity(self):
1271
+ # Ensure that 2 waveforms with the same values are encoded in the same
1272
+ # way, regardless of their memory layout. Here we encode 2 equal
1273
+ # waveforms, one is row-aligned while the other is column-aligned.
1274
+
1275
num_samples = 10_000 # per channel
1276
contiguous_samples = torch.rand(2, num_samples).contiguous()
1277
assert contiguous_samples.stride() == (num_samples, 1)
0 commit comments