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

Function removespaces

numpy/f2py/crackfortran.py:1606–1618  ·  view source on GitHub ↗
(expr)

Source from the content-addressed store, hash-verified

1604
1605
1606def removespaces(expr):
1607 expr = expr.strip()
1608 if len(expr) <= 1:
1609 return expr
1610 expr2 = expr[0]
1611 for i in range(1, len(expr) - 1):
1612 if (expr[i] == ' ' and
1613 ((expr[i + 1] in "()[]{}=+-/* ") or
1614 (expr[i - 1] in "()[]{}=+-/* "))):
1615 continue
1616 expr2 = expr2 + expr[i]
1617 expr2 = expr2 + expr[-1]
1618 return expr2
1619
1620
1621def markinnerspaces(line):

Callers 1

updatevarsFunction · 0.85

Calls 1

stripMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…