mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 02:17:45 +00:00
Change tuplify to listify
This commit is contained in:
parent
661bf33982
commit
6db6e858c4
2 changed files with 4 additions and 4 deletions
|
|
@ -7,7 +7,7 @@ from manimlib.mobject.svg.tex_mobject import TexMobject
|
|||
from manimlib.mobject.svg.tex_mobject import TextMobject
|
||||
from manimlib.mobject.types.vectorized_mobject import VGroup
|
||||
from manimlib.utils.color import color_gradient
|
||||
from manimlib.utils.iterables import tuplify
|
||||
from manimlib.utils.iterables import listify
|
||||
|
||||
EPSILON = 0.0001
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ class SampleSpace(Rectangle):
|
|||
self.label = label
|
||||
|
||||
def complete_p_list(self, p_list):
|
||||
new_p_list = list(tuplify(p_list))
|
||||
new_p_list = listify(p_list)
|
||||
remainder = 1.0 - sum(new_p_list)
|
||||
if abs(remainder) > EPSILON:
|
||||
new_p_list.append(remainder)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from manimlib.constants import *
|
|||
from manimlib.mobject.geometry import Square
|
||||
from manimlib.mobject.types.vectorized_mobject import VGroup
|
||||
from manimlib.mobject.types.vectorized_mobject import VMobject
|
||||
from manimlib.utils.iterables import tuplify
|
||||
from manimlib.utils.iterables import listify
|
||||
from manimlib.utils.space_ops import z_to_vector
|
||||
|
||||
##############
|
||||
|
|
@ -40,7 +40,7 @@ class ParametricSurface(VGroup):
|
|||
self.make_jagged()
|
||||
|
||||
def get_u_values_and_v_values(self):
|
||||
res = tuplify(self.resolution)
|
||||
res = listify(self.resolution)
|
||||
if len(res) == 1:
|
||||
u_res = v_res = res[0]
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue