summaryrefslogtreecommitdiff
path: root/src/python/test/test_datasets_generators.py
diff options
context:
space:
mode:
authorHind-M <hind.montassif@gmail.com>2021-10-26 13:59:44 +0200
committerHind-M <hind.montassif@gmail.com>2021-10-26 13:59:44 +0200
commitbb8c4994b89fb6bfdd80b76912acadf6197f93cc (patch)
treef49152cefad298a65e343378bc607b2a9a1a15db /src/python/test/test_datasets_generators.py
parent36959807d5091b79aedabbc67c363dd761c9d5ee (diff)
Add comments and some minor changes following code review
Diffstat (limited to 'src/python/test/test_datasets_generators.py')
-rwxr-xr-xsrc/python/test/test_datasets_generators.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/python/test/test_datasets_generators.py b/src/python/test/test_datasets_generators.py
index e2d300e0..933a763e 100755
--- a/src/python/test/test_datasets_generators.py
+++ b/src/python/test/test_datasets_generators.py
@@ -23,6 +23,8 @@ def _basic_torus(impl):
assert impl(n_samples = 64, dim = 3, sample = 'grid').shape == (64, 6)
assert impl(n_samples = 10, dim = 4, sample = 'random').shape == (10, 8)
+
+ # Here 1**dim < n_samples < 2**dim, the output shape is therefore (1, 2*dim) = (1, 8), where shape[0] is rounded down to the closest perfect 'dim'th power
assert impl(n_samples = 10, dim = 4, sample = 'grid').shape == (1, 8)
with pytest.raises(ValueError):