Skip to content

Commit 8c34447

Browse files
authored
fixed the use of the LinearTransformationSceneExample in Jupyter notebooks (ManimCommunity#3284)
* fix: prevent vector position array from being modified (ManimCommunity#3273) changed from np.asarray(point) to nd.array(point) in order to make sure that a copy of the array is created even if func is the identity function lambda pos: pos * fix: using the example for LinearTransformationScene in Jupyter notebooks The Manim magic in Jupyter notebooks adds a "renderer=" parameter to the __init__ call of the scene, but in its current form the example scene LinearTransformationSceneExample does not accept any **kwargs and thus creates an exception. Added the handling of **kwargs in the example scene. --------- Co-authored-by: Uwe Zimmermann <C:\Users\uwezi\AppData\Roaming\The Bat! Pwd>
1 parent e663277 commit 8c34447

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

manim/scene/vector_space_scene.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,11 +558,12 @@ class LinearTransformationScene(VectorScene):
558558
.. manim:: LinearTransformationSceneExample
559559
560560
class LinearTransformationSceneExample(LinearTransformationScene):
561-
def __init__(self):
561+
def __init__(self, **kwargs):
562562
LinearTransformationScene.__init__(
563563
self,
564564
show_coordinates=True,
565565
leave_ghost_vectors=True,
566+
*kwargs
566567
)
567568
568569
def construct(self):

0 commit comments

Comments
 (0)