擅长:python、mysql、java
<p>有一个集合nupy函数,它将Python<code>str</code>操作应用于数组的元素</p>
<p><a href="http://docs.scipy.org/doc/numpy/reference/routines.char.html" rel="nofollow">http://docs.scipy.org/doc/numpy/reference/routines.char.html</a></p>
<p>这包括一个<code>np.char.split</code>。在</p>
<p>在我有限的经验中,它们并不比列表理解快得多,因为它们仍然调用Python函数,而不是快速编译的<code>numpy</code>c<code>code.
If the split occurs at the same point in each string , eg</code>a[:5],a[5:]`,我们也许能够进行一些数据类型转换。在</p>
<p>结果是2d,对吧?在</p>