首页 > 解决方案 > 无法获取 numpy 数组的实际值

问题描述

我有一个numpy数组如下 -

test= [['test1' 'human,cow' 'human,cow' 'human,cow']
 ['test2' 'wheat,mouse' 'wheat,mouse' 'wheat,mouse']
['test3' 'wallaby,mouse' 'wallaby,mouse' 'wallaby,mouse']]

例如,当我尝试获取数组值时 test[0,1],我得到array(['human,cow'], dtype='<U13'). 我如何获得实际价值human,cow而不是array[], dtype=

标签: numpy

解决方案


推荐阅读