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

Function indent

numpy/_core/code_generators/generate_umath.py:1398–1403  ·  view source on GitHub ↗
(st, spaces)

Source from the content-addressed store, hash-verified

1396}
1397
1398def indent(st, spaces):
1399 indentation = ' ' * spaces
1400 indented = indentation + st.replace('\n', '\n' + indentation)
1401 # trim off any trailing spaces
1402 indented = re.sub(r' +$', r'', indented)
1403 return indented
1404
1405
1406# maps [nin, nout][type] to a suffix

Callers 1

make_codeFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…