Commit 95bce7a1 authored by Davis King's avatar Davis King

Added probability_that_sequence_is_increasing() to python API

parent 7481ef1e
......@@ -100,6 +100,16 @@ size_t py_count_steps_without_decrease_robust (
// ----------------------------------------------------------------------------------------
double probability_that_sequence_is_increasing (
py::object arr
)
{
DLIB_CASSERT(len(arr) > 2);
return probability_gradient_greater_than(python_list_to_vector<double>(arr), 0);
}
// ----------------------------------------------------------------------------------------
void hit_enter_to_continue()
{
std::cout << "Hit enter to continue";
......@@ -251,5 +261,7 @@ ensures \n\
!*/
);
m.def("probability_that_sequence_is_increasing",probability_that_sequence_is_increasing, py::arg("time_series"),
"returns the probability that the given sequence of real numbers is increasing in value over time.");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment