Skip to content

Commit

Permalink
Expose random_integer function
Browse files Browse the repository at this point in the history
  • Loading branch information
ideoforms committed Jul 28, 2024
1 parent 338bf26 commit 6ff5619
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/src/python/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ void init_python_util(py::module &m)

m.def("random_seed", random_seed, R"pbdoc(Set the global random seed)pbdoc");
m.def(
"random_uniform", []() { return random_uniform(); }, R"pbdoc(Return a uniformly random number)pbdoc");
"random_uniform", []() { return random_uniform(); }, R"pbdoc(Return a uniformly distributed random float)pbdoc");
m.def(
"random_uniform", [](float from, float to) { return random_uniform(from, to); }, R"pbdoc(Return a uniformly random number)pbdoc");
"random_uniform", [](float from, float to) { return random_uniform(from, to); }, R"pbdoc(Return a uniformly distributed random float)pbdoc");
m.def(
"random_integer", [](int from, int to) { return random_integer(from, to); }, R"pbdoc(Return a uniformly distributed random integer)pbdoc");
m.def(
"random_exponential", [](float from, float to) { return random_exponential(from, to); }, R"pbdoc(Return a random number, exponentially distributed across a fixed range)pbdoc");

Expand Down

0 comments on commit 6ff5619

Please sign in to comment.