A community-maintained Python framework for creating mathematical animations.
Replace scipy.special.comb with math.comb (#4598)
F. Muenkel95047579181d
diff --git a/manim/utils/simple_functions.py b/manim/utils/simple_functions.pyindex 792b7764d..317ea9ba4 100644--- a/manim/utils/simple_functions.py+++ b/manim/utils/simple_functions.py@@ -9,13 +9,12 @@ __all__ = ["sigmoid",]-+import mathfrom collections.abc import Callablefrom functools import lru_cachefrom typing import Any, Protocol, TypeVarimport numpy as np-from scipy import specialdef binary_search(@@ -87,9 +86,9 @@ def choose(n: int, k: int) -> int:References----------- https://en.wikipedia.org/wiki/Combination- - https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.comb.html+ - https://docs.python.org/3/library/math.html#math.comb"""- value: int = special.comb(n, k, exact=True)+ value: int = math.comb(n, k)return value