【发布时间】:2019-01-18 14:00:50
【问题描述】:
我有一个 2D numpy 数组,如下所示
[['me' 'you']
['her' 'him']]
我想得到一个这样的numpy数组
['meyou'
'herhim']
应该是一维numpy数组
在速度方面我如何以最有效的方式做到这一点?
【问题讨论】:
-
你怎么做,它是一个python字符串操作。即使使用 np.char。所以没有超快的数组方法。
标签: python python-3.x numpy concatenation string-concatenation