MCPcopy Create free account
hub / github.com/numpy/numpy / myeval

Function myeval

numpy/f2py/crackfortran.py:2301–2306  ·  view source on GitHub ↗

Like `eval` but returns only integers and floats

(e, g=None, l=None)

Source from the content-addressed store, hash-verified

2299
2300
2301def myeval(e, g=None, l=None):
2302 """ Like `eval` but returns only integers and floats """
2303 r = eval(e, g, l)
2304 if type(r) in [int, float]:
2305 return r
2306 raise ValueError('r=%r' % (r))
2307
2308getlincoef_re_1 = re.compile(r'\A\b\w+\b\Z', re.I)
2309

Callers 1

getlincoefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected