Getting started
User Guide
Advanced usage
sisl.geom
sisl.physics
sisl.typing
Development
Extras
Evaluate a mathematical expression using a safe evaluation method
expr (str) – the string to be evaluated using math
Any
Examples
>>> math_eval("2^6") 4 >>> math_eval("2**6") 64 >>> math_eval("1 + 2*3**(4^5) / (6 + -7)") -5.0