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

Function join

numpy/core/defchararray.py:1028–1059  ·  view source on GitHub ↗

Return a string which is the concatenation of the strings in the sequence `seq`. Calls `str.join` element-wise. Parameters ---------- sep : array_like of str or unicode seq : array_like of str or unicode Returns ------- out : ndarray Output array o

(sep, seq)

Source from the content-addressed store, hash-verified

1026
1027@array_function_dispatch(_join_dispatcher)
1028def join(sep, seq):
1029 """
1030 Return a string which is the concatenation of the strings in the
1031 sequence `seq`.
1032
1033 Calls `str.join` element-wise.
1034
1035 Parameters
1036 ----------
1037 sep : array_like of str or unicode
1038 seq : array_like of str or unicode
1039
1040 Returns
1041 -------
1042 out : ndarray
1043 Output array of str or unicode, depending on input types
1044
1045 See Also
1046 --------
1047 str.join
1048
1049 Examples
1050 --------
1051 >>> np.char.join('-', 'osd')
1052 array('o-s-d', dtype='<U5')
1053
1054 >>> np.char.join(['-', '.'], ['ghc', 'osd'])
1055 array(['g-h-c', 'o.s.d'], dtype='<U5')
1056
1057 """
1058 return _to_bytes_or_str_array(
1059 _vec_string(sep, object_, 'join', (seq,)), seq)
1060
1061
1062

Callers 15

configurationFunction · 0.85
setup_classMethod · 0.85
setup_classMethod · 0.85
setup_classMethod · 0.85
setup_classMethod · 0.85
setup_classMethod · 0.85
test_isfileobjFunction · 0.85
strseqFunction · 0.85
joinMethod · 0.85
configurationFunction · 0.85
generate_config_hFunction · 0.85
generate_numpyconfig_hFunction · 0.85

Calls 2

_vec_stringFunction · 0.90
_to_bytes_or_str_arrayFunction · 0.85

Tested by 9

setup_classMethod · 0.68
setup_classMethod · 0.68
setup_classMethod · 0.68
setup_classMethod · 0.68
setup_classMethod · 0.68
test_isfileobjFunction · 0.68
test_1Method · 0.68
test_2Method · 0.68
test_gpathsMethod · 0.68