manim.mobject.matrix.DecimalMatrix

class DecimalMatrix(matrix, element_to_mobject=<class 'manim.mobject.numbers.DecimalNumber'>, element_to_mobject_config={'num_decimal_places': 1}, **kwargs)[source]

Bases: manim.mobject.matrix.Matrix

A mobject that displays a matrix with decimal entries on the screen.

Will round/truncate the decimal places as per the provided config.

Parameters
  • matrix (typing.Iterable) – A numpy 2d array or list of lists

  • element_to_mobject (Mobject, optional) – Mobject to use, by default DecimalNumber

  • element_to_mobject_config (Dict[str, Mobject], optional) – Config for the desired mobject, by default {“num_decimal_places”: 1}

Methods

Attributes

animate

Used to animate the application of a method.

depth

The depth of the mobject.

height

The height of the mobject.

width

The width of the mobject.