Browse Source

Test: separate expression build and showing it

master
Bertrand Benjamin 8 months ago
parent
commit
7f8939eab2
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      mapytex/calculus/API/expression.py

+ 4
- 2
mapytex/calculus/API/expression.py View File

@ -136,9 +136,11 @@ class Expression(object):
:returns: TODO
:example:
>>> Expression.random("{a}/{a*k}") # doctest: +SKIP
>>> e = Expression.random("{a}/{a*k}")
>>> e # doctest: +SKIP
<Exp: -3 / -15>
>>> Expression.random("{a}/{a*k} - 3*{b}", variables_scope={'a':{'min_max':(10, 30)}}) # doctest: +SKIP
>>> e = Expression.random("{a}/{a*k} - 3*{b}", variables_scope={'a':{'min_max':(10, 30)}})
>>> e # doctest: +SKIP
<Exp: 18 / 108 - 3 * 9>
>>> e = Expression.random("{a}*x + {b}*x + 3", ["a>b"], rejected=[0, 1])
>>> ee = e.simplify()

Loading…
Cancel
Save