Simple_functions¶
manimlib/utils/simple_functions.py
这个文件中包含了一些常用的简单函数
-
manimlib.utils.simple_functions.
sigmoid
(x)¶
sigmoid 函数, 1/(1+e^(-x))
-
manimlib.utils.simple_functions.
gen_choose
(n, r)¶
计算 \(C^k_n\)
-
manimlib.utils.simple_functions.
get_num_args
(function)¶
获取 function 的参数个数
-
manimlib.utils.simple_functions.
get_parameters
(function)¶
获取 function 的参数
-
manimlib.utils.simple_functions.
fdiv
(a, b, zero_over_zero_value=None)¶
计算 a/b,若 0/0 则返回 zero_over_zero_value
-
manimlib.utils.simple_functions.
binary_search
(function, target, lower_bound, upper_bound, tolerance=0.0001)¶
二分查找