Reproducibility#
Some of the GUDHI functionnalities are using randomness. In order to reproduce the results, a seed mechanism is available.
- gudhi.random.set_seed(seed)[source]#
Sets the seed for internal GUDHI functionnalities that are using randomness.
- Parameters:
seed¶ (
int) – The new seed value.
Note
This function also sets the default random CGAL seed (cf. CGAL::Random).
Note
set_seed() does not set NumPy seed, while some GUDHI functionnalities use NumPy random methods.
NumPy seed can be set
with:
import numpy as np
np.random.seed(42)