A community-maintained Python framework for creating mathematical animations.
Fixed get_merged_array bug
Grant Sanderson5d9eb8d5a0b3
diff --git a/mobject/mobject.py b/mobject/mobject.pyindex d79c54820..4395f1f70 100644--- a/mobject/mobject.py+++ b/mobject/mobject.py@@ -496,9 +496,12 @@ class Mobject(object):return 0def get_merged_array(self, array_attr):- result = np.zeros((0, self.dim))+ result = Nonefor 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 resultdef get_all_points(self):diff --git a/mobject/point_cloud_mobject.py b/mobject/point_cloud_mobject.pyindex 787075759..7ce367c57 100644--- a/mobject/point_cloud_mobject.py+++ b/mobject/point_cloud_mobject.py@@ -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)