numpy.char.join#

char.join(sep,seq)[source]#

Return a string which is the concatenation of the strings in thesequenceseq.

Callsstr.join element-wise.

Parameters:
separray-like, withStringDType,bytes_, orstr_ dtype
seqarray-like, withStringDType,bytes_, orstr_ dtype
Returns:
outndarray

Output array ofStringDType,bytes_ orstr_ dtype,depending on input types

See also

str.join

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