mirror of
https://github.com/3b1b/manim.git
synced 2025-07-31 14:03:59 +08:00
Fixed get_merged_array bug
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user