summaryrefslogtreecommitdiff
path: root/src/python/gudhi/datasets/generators/_points.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/gudhi/datasets/generators/_points.cc')
-rw-r--r--src/python/gudhi/datasets/generators/_points.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/python/gudhi/datasets/generators/_points.cc b/src/python/gudhi/datasets/generators/_points.cc
index 6baed673..82fea25b 100644
--- a/src/python/gudhi/datasets/generators/_points.cc
+++ b/src/python/gudhi/datasets/generators/_points.cc
@@ -85,7 +85,9 @@ PYBIND11_MODULE(_points, m) {
m.def("sphere", &generate_points_on_sphere,
py::arg("n_samples"), py::arg("ambient_dim"),
py::arg("radius") = 1., py::arg("sample") = "random",
- R"pbdoc( Generate random i.i.d. points uniformly on a (d-1)-sphere in R^d
+ R"pbdoc(
+ Generate random i.i.d. points uniformly on a (d-1)-sphere in R^d
+
:param n_samples: The number of points to be generated.
:type n_samples: integer
:param ambient_dim: The ambient dimension d.
@@ -94,20 +96,26 @@ PYBIND11_MODULE(_points, m) {
:type radius: float
:param sample: The sample type. Default and only available value is `"random"`.
:type sample: string
- :rtype: numpy array of float
:returns: the generated points on a sphere.
)pbdoc");
m.def("ctorus", &generate_points_on_torus,
py::arg("n_samples"), py::arg("dim"), py::arg("sample") = "random",
- R"pbdoc( Generate random i.i.d. points on a d-torus in R^2d or as a grid
+ R"pbdoc(
+ Generate random i.i.d. points on a d-torus in R^2d or as a grid
+
:param n_samples: The number of points to be generated.
:type n_samples: integer
:param dim: The dimension of the torus on which points would be generated in R^2*dim.
:type dim: integer
:param sample: The sample type. Available values are: `"random"` and `"grid"`. Default value is `"random"`.
:type sample: string
- :rtype: numpy array of float. 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), where shape[0] is rounded down to the closest perfect 'dim'th power.
:returns: 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': (⌊n_samples**(1./dim)⌋**dim, 2*dim), where shape[0] is rounded down to the closest perfect 'dim'th power.
)pbdoc");
}