numpy.char.join#
- char.join(sep,seq)[source]#
Return a string which is the concatenation of the strings in thesequenceseq.
Calls
str.joinelement-wise.- Parameters:
- separray-like, with
StringDType,bytes_, orstr_dtype - seqarray-like, with
StringDType,bytes_, orstr_dtype
- separray-like, with
- Returns:
- outndarray
Output array of
StringDType,bytes_orstr_dtype,depending on input types
See also
Examples
>>>importnumpyasnp>>>np.strings.join('-','osd')array('o-s-d', dtype='<U5')
>>>np.strings.join(['-','.'],['ghc','osd'])array(['g-h-c', 'o.s.d'], dtype='<U5')
On this page