Feat: allow import Integer in calculus

This commit is contained in:
Bertrand Benjamin 2019-10-13 22:38:02 +02:00
parent 1dccaabd86
commit 1a74c54548
4 changed files with 3 additions and 5 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
# encoding: utf-8
from .calculus import Expression # , Polynom, Fraction, random_str, txt, Equation
from .calculus import Expression, Integer # , Polynom, Fraction, random_str, txt, Equation
# Expression.set_render('tex')

View File

@ -110,6 +110,7 @@ x^7
"""
from .expression import Expression
from .tokens.number import Integer
if __name__ == "__main__":
e = Expression.from_str("1+2/3/4/5")

View File

@ -108,9 +108,6 @@ class Expression(object):
>>> e = Expression.from_str("2x + 1 + 5x")
>>> e
<Exp: 2x + 1 + 5x>
>>> e = Expression.from_str("3")
>>> e
"""
t = Tree.from_str(string)
if typing:

View File

@ -30,7 +30,7 @@ Expression is the classe wich handle all calculus. It can randomly generate or i
"""
from .API import Expression
from .API import Expression, Integer
__all__ = ["Expression"]