Search code examples
pythonsympy

Ignore Greek Letter Representation in SymPy?


I'm trying to make a variable with the subscript pi on it as follows:

r_pi = sp.symbols('r_pi')

enter image description here

When displayed, the symbol uses the greek letter π as the subscript but my intention in this case is to actually just use "pi" as if it is not a greek letter. Is there to make sympy ignore converting this symbol to a greek letter?


Solution

  • You can use mathrm in the name:

    enter image description here