Feat: Defaut render is tex when Expression is imported from mapytex

This commit is contained in:
Bertrand Benjamin 2019-06-28 09:34:06 +02:00
parent 152fa2301c
commit 5ea09aebf2
2 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,9 @@
# encoding: utf-8
from .calculus import Expression#, Polynom, Fraction, random_str, txt, Equation
Expression.RENDER = 'tex'
#from .stat import Dataset, WeightedDataset
#from .geometry import random_pythagore

View File

@ -153,7 +153,7 @@ class Expression(object):
return renders[self.RENDER](self._tree)
def __repr__(self):
return f"<Exp: {renders[self.RENDER](self._tree)}>"
return f"<Exp: {renders['txt'](self._tree)}>"
def _order(self, exclude_nodes=["*", "/", "**"]):
""" Order the expression base on types