PlasmaCalcs
Usage
PlasmaCalcs API
plasma_calculator
quantities
dimensions
units
hookups
addons
other_calculators
mhd
multi_run_analysis
tools
array_select
arrays
display
docs_tools
fft_tools
history
imports
io_tools
iterables
math
_ast_math_eval_node
as_roman_numeral
ast_math_eval
float_rounding
from_roman_numeral
is_integer
is_number
nonempty_product
np_all_int
product
round_to_int
multiprocessing
oop_tools
os_tools
properties
pytools
sci_tools
sentinels
sql_tools
supercomputer
timing
trees
xarray_tools
plotting
defaults
errors
PlasmaCalcs
PlasmaCalcs API
tools
math
ast_math_eval
View page source
ast_math_eval
PlasmaCalcs.tools.math.
ast_math_eval
(
expr
)
evaluate a string math expression using ast. (only accepts numbers & math operations.)
This is safe because it uses ast; it does not ever use the unsafe eval() command.