mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 11:03:03 +08:00
Video work (#1739)
* Enable setting points to a null list, and adding one point at a time. * Add refresh_locked_data * Add presenter mode to scenes with -p option * Allow for an embed by hitting e during interaction * Add set_min_height, etc. * Make sure null parametric curve has at least one point * Account for edge case where \{ is used in Tex * Allow for logging notes in wait calls, useful for presenter mode * Simplify choose, and add gen_choose for fractional amounts * Default to no top on axes * Allow match_x, match_y, etc. to take in a point * Allow wait calls to ignore presenter mode * Just use math.combo, no caching with choose(n, r) * Use generator instead of list in bezier * Bubble init_colors should override * Account for "px" values read in from an svg * Stop displaying when writing is happening * Update the way Bubble override SVG colors
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import inspect
|
||||
import numpy as np
|
||||
from scipy import special
|
||||
import math
|
||||
from functools import lru_cache
|
||||
|
||||
|
||||
@ -10,7 +10,11 @@ def sigmoid(x):
|
||||
|
||||
@lru_cache(maxsize=10)
|
||||
def choose(n, k):
|
||||
return special.comb(n, k, exact=True)
|
||||
return math.comb(n, k)
|
||||
|
||||
|
||||
def gen_choose(n, r):
|
||||
return np.prod(np.arange(n, n - r, -1)) / math.factorial(r)
|
||||
|
||||
|
||||
def get_num_args(function):
|
||||
|
Reference in New Issue
Block a user