Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Add missing argument for classes inheriting from class 'Matrix' (#859)

Christian Coenen27758d05874b
diff --git a/manim/mobject/matrix.py b/manim/mobject/matrix.py
index 6c70f5d8c..eba189581 100644
--- a/manim/mobject/matrix.py
+++ b/manim/mobject/matrix.py
@@ -195,12 +195,14 @@ class Matrix(VMobject):
class DecimalMatrix(Matrix):
def __init__(
self,
+ matrix,
element_to_mobject=DecimalNumber,
element_to_mobject_config={"num_decimal_places": 1},
**kwargs
):
Matrix.__init__(
self,
+ matrix,
element_to_mobject=element_to_mobject,
element_to_mobject_config=element_to_mobject_config,
**kwargs
@@ -208,13 +210,13 @@ class DecimalMatrix(Matrix):
class IntegerMatrix(Matrix):
- def __init__(self, element_to_mobject=Integer, **kwargs):
- Matrix.__init__(self, element_to_mobject=element_to_mobject, **kwargs)
+ def __init__(self, matrix, element_to_mobject=Integer, **kwargs):
+ Matrix.__init__(self, matrix, element_to_mobject=element_to_mobject, **kwargs)
class MobjectMatrix(Matrix):
- def __init__(self, element_to_mobject=lambda m: m, **kwargs):
- Matrix.__init__(self, element_to_mobject=element_to_mobject, **kwargs)
+ def __init__(self, matrix, element_to_mobject=lambda m: m, **kwargs):
+ Matrix.__init__(self, matrix, element_to_mobject=element_to_mobject, **kwargs)
def get_det_text(