Fix assert having wrong condition

This commit is contained in:
Davis King 2022-06-06 22:01:59 -04:00
parent 1de7924694
commit 0f1d8e964f

View File

@ -60,7 +60,7 @@ double call_func(py::object f, const matrix<double,0,1>& args)
const auto num = num_function_arguments(f, args.size());
DLIB_CASSERT(num == args.size(),
"The function being optimized takes a number of arguments that doesn't agree with the size of the bounds lists you provided to find_max_global()");
DLIB_CASSERT(0 < num && num < 35, "Functions being optimized must take between 1 and 35 scalar arguments.");
DLIB_CASSERT(0 < num && num <= 35, "Functions being optimized must take between 1 and 35 scalar arguments.");
#define CALL_WITH_N_ARGS(N) case N: return dlib::gopt_impl::_cwv(f,args,typename make_compile_time_integer_range<N>::type()).cast<double>();
switch (num)