MCPcopy Index your code
hub / github.com/numpy/numpy / fromstring

Function fromstring

numpy/f2py/symbolic.py:1272–1281  ·  view source on GitHub ↗

Create an expression from a string. This is a "lazy" parser, that is, only arithmetic operations are resolved, non-arithmetic operations are treated as symbols.

(s, language=Language.C)

Source from the content-addressed store, hash-verified

1270
1271
1272def fromstring(s, language=Language.C):
1273 """Create an expression from a string.
1274
1275 This is a "lazy" parser, that is, only arithmetic operations are
1276 resolved, non-arithmetic operations are treated as symbols.
1277 """
1278 r = _FromStringWorker(language=language).parse(s)
1279 if isinstance(r, Expr):
1280 return r
1281 raise ValueError(f'failed to parse `{s}` to Expr instance: got `{r}`')
1282
1283
1284class _Pair:

Callers 2

test_fromstringMethod · 0.90
parseMethod · 0.70

Calls 2

_FromStringWorkerClass · 0.85
parseMethod · 0.45

Tested by 1

test_fromstringMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…