How does one add set symbols in manim?


I’m trying to write the set of natural and real numbers in manim using MathTex, but I haven’t found a way that works. Every time I try to use shortcuts I’ve searched up about LaTeX, such as N, natnums, mathbb{N}, and such don’t work, returning the error message:

TypeError: ‘numpy.ndarray’ object is not callable

Does anyone have a solution to this?

Here is the troublesome part in the current version of my code:


As previously mentioned, I get the following error message:

TypeError: ‘numpy.ndarray’ object is not callable.

Asked By: Tejas Avyaan



Try adding the amsfonts package to your manim code:

class WriteNaturalNumber(Scene):
    def construct(self):
        myTemplate = TexTemplate()
        myTemplate.add_to_preamble(r"usepackage{amsfonts}") # adds package to construct
        # Write the symbol
        tex = Tex(


Natural number symbol

Answered By: Jason Grace
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.