我想提出一个字符串数组的位置,但我得到一个错误:我怎样才能把一个字符串数组
ValueError: could not convert string to float
我的代码如下:
k = np.ceil(99/8)
rs = np.zeros((int(k), 10))
for i in range(0, int(k)):
rs[i, 0] = "FREQ"
for j in range(1,9):
rs[i, j] = rs_imp[8*k+j, 0]
也许[这篇文章](http://stackoverflow.com/questions/6999617/how-to-assign-a-string-value-to-an-array-in-numpy)是你实际上正在寻找执行。 –