相关疑难解决方法(0)

从Numpy矩阵构造Python集

我正在尝试执行以下操作

>> from numpy import *
>> x = array([[3,2,3],[4,4,4]])
>> y = set(x)
TypeError: unhashable type: 'numpy.ndarray'
Run Code Online (Sandbox Code Playgroud)

如何使用Numpy数组中的所有元素轻松高效地创建集合?

python arrays numpy set

17
推荐指数
3
解决办法
3万
查看次数

标签 统计

arrays ×1

numpy ×1

python ×1

set ×1