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

Function indent

numpy/core/code_generators/generate_umath.py:1135–1140  ·  view source on GitHub ↗
(st, spaces)

Source from the content-addressed store, hash-verified

1133}
1134
1135def indent(st, spaces):
1136 indentation = ' '*spaces
1137 indented = indentation + st.replace('\n', '\n'+indentation)
1138 # trim off any trailing spaces
1139 indented = re.sub(r' +$', r'', indented)
1140 return indented
1141
1142# maps [nin, nout][type] to a suffix
1143arity_lookup = {

Callers 2

make_codeFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by 1