https://blog.youkuaiyun.com/qq_17753903/article/details/82185012
二(多)维array转化为set:
set(array.reshape(-1))
因为无论list还是ndarray,set()都只能转化一维的。所以先将数组reshape到一维,操作为:
.reshape(-1)
https://blog.youkuaiyun.com/qq_17753903/article/details/82185012
二(多)维array转化为set:
set(array.reshape(-1))
因为无论list还是ndarray,set()都只能转化一维的。所以先将数组reshape到一维,操作为:
.reshape(-1)