此函数执行逐元素的字符串连接。
import numpy as np print 'Concatenate two strings:' print np.char.add(['hello'],[' xyz']) print '\n' print 'Concatenation example:' print np.char.add(['hello', 'hi'],[' abc', ' xyz'])
其输出如下-
Concatenate two strings: ['hello xyz'] Concatenation example: ['hello abc' 'hi xyz']
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)
Spring Cloud 微服务项目实战 -〔姚秋辰(姚半仙)〕