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

Function normalize_whitespace

numpy/f2py/tests/test_pyf_src.py:30–35  ·  view source on GitHub ↗

Remove leading and trailing whitespace, and convert internal stretches of whitespace to a single space.

(s)

Source from the content-addressed store, hash-verified

28
29
30def normalize_whitespace(s):
31 """
32 Remove leading and trailing whitespace, and convert internal
33 stretches of whitespace to a single space.
34 """
35 return ' '.join(s.split())
36
37
38def test_from_template():

Callers 1

test_from_templateFunction · 0.85

Calls 2

joinMethod · 0.80
splitMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…