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

Method replace

numpy/core/defchararray.py:2511–2521  ·  view source on GitHub ↗

For each element in `self`, return a copy of the string with all occurrences of substring `old` replaced by `new`. See Also -------- char.replace

(self, old, new, count=None)

Source from the content-addressed store, hash-verified

2509 return asarray(partition(self, sep))
2510
2511 def replace(self, old, new, count=None):
2512 """
2513 For each element in `self`, return a copy of the string with all
2514 occurrences of substring `old` replaced by `new`.
2515
2516 See Also
2517 --------
2518 char.replace
2519
2520 """
2521 return asarray(replace(self, old, new, count))
2522
2523 def rfind(self, sub, start=0, end=None):
2524 """

Callers 15

asv_substitute_configFunction · 0.80
find_missingFunction · 0.80
check_outputMethod · 0.80
normpathFunction · 0.80
parse_exprFunction · 0.80
parse_distributions_hFunction · 0.80
test_reprMethod · 0.80
test_strMethod · 0.80
_parse_docstringsFunction · 0.80
_convert_from_stringFunction · 0.80
sym2defFunction · 0.80
type2defFunction · 0.80

Calls 2

asarrayFunction · 0.70
replaceFunction · 0.70

Tested by 15

asv_substitute_configFunction · 0.64
test_reprMethod · 0.64
test_strMethod · 0.64
assert_features_equalFunction · 0.64
_text_to_listFunction · 0.64
_to_unsignedMethod · 0.64
test_replaceMethod · 0.64
setup_methodMethod · 0.64
test_complex_parsingFunction · 0.64