diff options
author | Hind-M <hind.montassif@gmail.com> | 2021-06-01 11:20:26 +0200 |
---|---|---|
committer | Hind-M <hind.montassif@gmail.com> | 2021-06-01 11:20:26 +0200 |
commit | 09214d0ad3abd0c81b3a2c8051bf8b370350d6e5 (patch) | |
tree | 69a9d11daafd3a7f186e1d400e9e9ddc97be0326 /src/python/gudhi/datasets/generators | |
parent | 128281228ac8462acc82f3d9288e764a9688b293 (diff) |
Add datasets generators documentation
Diffstat (limited to 'src/python/gudhi/datasets/generators')
-rw-r--r-- | src/python/gudhi/datasets/generators/points.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/python/gudhi/datasets/generators/points.py b/src/python/gudhi/datasets/generators/points.py index a8f5ad54..3870dea6 100644 --- a/src/python/gudhi/datasets/generators/points.py +++ b/src/python/gudhi/datasets/generators/points.py @@ -32,17 +32,17 @@ def _generate_grid_points_on_torus(n_samples, dim): return array_points def torus(n_samples, dim, sample='random'): - ''' + """ Generate points on a dim-torus in R^2dim either randomly or on a grid :param n_samples: The number of points to be generated. :param dim: The dimension of the torus on which points would be generated in R^2*dim. :param sample: The sample type of the generated points. Can be 'random' or 'grid'. :returns: numpy array containing the generated points on a torus. - The shape of returned numpy array is : - if sample is 'random' : (n_samples, 2*dim) - if sample is 'grid' : ((int(n_samples**(1./dim)))**dim, 2*dim) - ''' + The shape of returned numpy array is : + if sample is 'random' : (n_samples, 2*dim). + if sample is 'grid' : ([n_samples**(1./dim)]**dim, 2*dim). + """ if sample == 'random': # Generate points randomly print("Sample is random") |