summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVincent Rouvreau <10407034+VincentRouvreau@users.noreply.github.com>2021-11-02 14:38:46 +0100
committerGitHub <noreply@github.com>2021-11-02 14:38:46 +0100
commit93df8a0622836ab03ada2eac075132388708d2c4 (patch)
tree15eaa6e68822897cd9558e183257d2c21a86fd84 /src
parent6bbd3c0c62d02ac5641ba77a33f7c5d100320ce0 (diff)
Apply MG's suggestion
Diffstat (limited to 'src')
-rw-r--r--src/python/gudhi/datasets/generators/_points.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/python/gudhi/datasets/generators/_points.cc b/src/python/gudhi/datasets/generators/_points.cc
index 5d675930..70ce4925 100644
--- a/src/python/gudhi/datasets/generators/_points.cc
+++ b/src/python/gudhi/datasets/generators/_points.cc
@@ -36,8 +36,12 @@ py::array_t<double> generate_points_on_sphere(size_t n_samples, int ambient_dim,
GUDHI_CHECK(ambient_dim == buf.shape[1], "Py array second dimension not matching the ambient space dimension");
- py::gil_scoped_release release;
- auto points_generated = Gudhi::generate_points_on_sphere_d<Kern>(n_samples, ambient_dim, radius);
+ std::vector<typename Kern::Point_d> points_generated;
+
+ {
+ py::gil_scoped_release release;
+ points_generated = Gudhi::generate_points_on_sphere_d<Kern>(n_samples, ambient_dim, radius);
+ }
for (size_t i = 0; i < n_samples; i++)
for (int j = 0; j < ambient_dim; j++)