提取一个数组中的中文 输出到另一个数组

a = np.array([rows,cols])

[rows, cols] = data.shape
for i in range(rows):
    for j in range(cols):
        str=data[i,j]
        for w in str:
            if  w>= u'\u4e00' and w<=u'\u9fa5':
                a[i,j]+=w
      报错:

TypeError: 'int' object is not iterable

print一下str看看是什么内容?这个提示就是指你的str是一个整数,不能使用for w in str来遍历