我有两个不同的数组,一个是字符串,另一个是整数.我想将它们连接到一个数组中,其中每列都具有原始数据类型.我目前的解决方案(见下文)将整个数组转换为dtype = string,这看起来非常低效.
combined_array = np.concatenate((A, B), axis = 1)
是否有可能多发dtypes的combined_array时候A.dtype = string和B.dtype = int?
我正在尝试使用 numpy,当使用内置方法 dtype.Following 我得到的几个结果时,我遇到了以下数据类型。你能解释一下u11是什么意思吗
a1 = np.array([3,5,'p'])
print(a1.dtype)
Run Code Online (Sandbox Code Playgroud)
o/p = >U11