mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Fixed get_merged_array bug
This commit is contained in:
parent
ec1afdbb83
commit
5d9eb8d5a0
2 changed files with 5 additions and 3 deletions
|
@ -496,9 +496,12 @@ class Mobject(object):
|
|||
return 0
|
||||
|
||||
def get_merged_array(self, array_attr):
|
||||
result = np.zeros((0, self.dim))
|
||||
result = None
|
||||
for mob in self.family_members_with_points():
|
||||
result = np.append(result, getattr(mob, array_attr), 0)
|
||||
if result is None:
|
||||
result = getattr(mob, array_attr)
|
||||
else:
|
||||
result = np.append(result, getattr(mob, array_attr), 0)
|
||||
return result
|
||||
|
||||
def get_all_points(self):
|
||||
|
|
|
@ -47,7 +47,6 @@ class PMobject(Mobject):
|
|||
])
|
||||
return self
|
||||
|
||||
|
||||
def match_colors(self, mobject):
|
||||
Mobject.align_data(self, mobject)
|
||||
self.rgbas = np.array(mobject.rgbas)
|
||||
|
|
Loading…
Add table
Reference in a new issue