From 5e25ecd33ca8651a9a142e9e04b44d70a947cd30 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Sat, 10 Feb 2018 22:19:00 -0800 Subject: [PATCH] Tiny changes --- animation/transform.py | 2 +- camera/camera.py | 9 ++------- topics/number_line.py | 2 -- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/animation/transform.py b/animation/transform.py index 30d7c7d2..4ee132a5 100644 --- a/animation/transform.py +++ b/animation/transform.py @@ -48,7 +48,7 @@ class Transform(Animation): self.path_arc, self.path_arc_axis, ) - + def get_all_mobjects(self): return self.mobject, self.starting_mobject, self.target_mobject diff --git a/camera/camera.py b/camera/camera.py index 6c7c369f..958787f9 100644 --- a/camera/camera.py +++ b/camera/camera.py @@ -10,10 +10,6 @@ from helpers import * from mobject import Mobject, PMobject, VMobject, \ ImageMobject, Group, BackgroundColoredVMobject -# Set a @profile decorator over any method whose -# performance you'd like to analyze -from profilehooks import profile - class Camera(object): CONFIG = { "background_image" : None, @@ -179,7 +175,6 @@ class Camera(object): def capture_mobject(self, mobject, **kwargs): return self.capture_mobjects([mobject], **kwargs) - @profile def capture_mobjects(self, mobjects, **kwargs): self.reset_aggdraw_canvas() mobjects = self.get_mobjects_to_display(mobjects, **kwargs) @@ -256,7 +251,7 @@ class Camera(object): fill_rgb = self.get_fill_rgb(vmobject) fill_hex = rgb_to_hex(fill_rgb) fill = aggdraw.Brush(fill_hex, fill_opacity) - + return (pen, fill) def color_to_hex_l(self, color): @@ -280,7 +275,7 @@ class Camera(object): continue aligned_points = self.align_points_to_camera(points) coords = self.points_to_pixel_coords(aligned_points) - coord_strings = coords.flatten().astype("string") + coord_strings = coords.flatten().astype(str) #Start new path string with M coord_strings[0] = "M" + coord_strings[0] #The C at the start of every 6th number communicates diff --git a/topics/number_line.py b/topics/number_line.py index 4dab9f07..30ad693a 100644 --- a/topics/number_line.py +++ b/topics/number_line.py @@ -136,8 +136,6 @@ class NumberLine(VMobject): self.tip = tip self.add(tip) - - class UnitInterval(NumberLine): CONFIG = { "x_min" : 0,