SciPy Convex Hull返回太多(重复)方程式

时间:2016-08-25 14:49:23

标签: python scipy

使用一堆12维点(见下文),我正在尝试用SciPy生成一个ConvexHull。

这是可行的,但我得到的方法太多了,11022确切地说,许多方程都是精确的重复。

我可以使用NumPy删除重复项(这会将其减少到大约20(!)个等式),但由于我还想访问.neighbors,我害怕搞砸索引。

知道为什么会这样吗?这是一个错误吗?

点数组:

[[ 1.  1.  1.  0.  1.  1.  1.  0.  1.  0.  0.  0.]
 [ 1.  1.  0.  0.  1.  0.  0.  0.  1.  1.  1.  0.]
 [ 1.  1.  1.  1.  1.  0.  0.  0.  0.  1.  0.  0.]
 [ 1.  1.  0.  1.  0.  0.  0.  0.  0.  0.  1.  1.]
 [ 1.  1.  1.  1.  1.  1.  1.  1.  0.  0.  0.  0.]
 [ 1.  1.  0.  1.  1.  0.  0.  0.  0.  0.  1.  0.]
 [ 1.  1.  1.  1.  0.  1.  1.  0.  0.  0.  0.  1.]
 [ 1.  1.  1.  1.  1.  0.  0.  0.  0.  0.  0.  0.]
 [ 1.  1.  1.  0.  1.  1.  0.  0.  1.  0.  0.  0.]
 [ 1.  1.  0.  0.  0.  1.  0.  0.  1.  0.  1.  1.]
 [ 1.  1.  0.  1.  0.  1.  1.  1.  0.  0.  1.  1.]
 [ 1.  1.  1.  0.  0.  1.  1.  0.  1.  0.  0.  1.]
 [ 1.  1.  1.  0.  0.  0.  0.  0.  1.  1.  0.  1.]
 [ 1.  1.  0.  0.  1.  1.  1.  0.  1.  0.  1.  0.]
 [ 1.  1.  1.  0.  1.  0.  0.  0.  1.  0.  0.  0.]
 [ 1.  1.  0.  1.  1.  0.  1.  1.  0.  1.  1.  0.]
 [ 1.  1.  0.  0.  0.  0.  1.  0.  1.  1.  1.  1.]
 [ 1.  1.  1.  0.  1.  1.  1.  1.  1.  0.  0.  0.]
 [ 1.  1.  0.  0.  1.  0.  1.  1.  1.  1.  1.  0.]
 [ 1.  1.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.]
 [ 1.  1.  0.  0.  0.  1.  1.  1.  1.  0.  1.  1.]
 [ 1.  1.  0.  1.  0.  1.  0.  0.  0.  0.  1.  1.]
 [ 1.  1.  0.  0.  0.  0.  0.  0.  1.  0.  1.  1.]
 [ 1.  1.  1.  0.  0.  0.  1.  1.  1.  1.  0.  1.]
 [ 1.  1.  0.  1.  0.  0.  1.  0.  0.  1.  1.  1.]
 [ 1.  1.  0.  1.  1.  0.  0.  0.  0.  1.  1.  0.]
 [ 1.  1.  1.  0.  1.  0.  1.  0.  1.  1.  0.  0.]
 [ 1.  1.  0.  0.  1.  1.  1.  1.  1.  0.  1.  0.]
 [ 1.  1.  1.  1.  1.  0.  1.  1.  0.  1.  0.  0.]
 [ 1.  1.  1.  1.  1.  1.  0.  0.  0.  0.  0.  0.]
 [ 1.  1.  0.  1.  1.  1.  0.  0.  0.  0.  1.  0.]
 [ 1.  1.  1.  1.  1.  0.  1.  0.  0.  1.  0.  0.]
 [ 1.  1.  1.  1.  0.  0.  0.  0.  0.  1.  0.  1.]
 [ 1.  1.  1.  0.  0.  0.  0.  0.  1.  0.  0.  0.]
 [ 1.  1.  0.  0.  0.  0.  0.  0.  0.  0.  1.  0.]
 [ 1.  1.  0.  1.  1.  1.  1.  0.  0.  0.  1.  0.]
 [ 1.  1.  0.  1.  0.  1.  1.  0.  0.  0.  1.  1.]
 [ 1.  1.  1.  0.  1.  0.  1.  1.  1.  1.  0.  0.]
 [ 1.  1.  0.  0.  0.  0.  1.  1.  1.  1.  1.  1.]
 [ 1.  1.  1.  1.  0.  0.  1.  0.  0.  1.  0.  1.]
 [ 1.  1.  1.  1.  0.  1.  0.  0.  0.  0.  0.  1.]
 [ 1.  1.  1.  0.  0.  1.  1.  1.  1.  0.  0.  1.]
 [ 1.  1.  0.  0.  1.  1.  0.  0.  1.  0.  1.  0.]
 [ 1.  1.  1.  1.  1.  1.  1.  0.  0.  0.  0.  0.]
 [ 1.  1.  1.  0.  0.  0.  0.  0.  0.  0.  0.  0.]
 [ 1.  1.  0.  1.  0.  0.  0.  0.  0.  1.  1.  1.]
 [ 1.  1.  0.  1.  1.  0.  1.  0.  0.  1.  1.  0.]
 [ 1.  1.  0.  1.  1.  1.  1.  1.  0.  0.  1.  0.]
 [ 1.  1.  0.  0.  1.  0.  1.  0.  1.  1.  1.  0.]
 [ 1.  1.  1.  0.  0.  0.  1.  0.  1.  1.  0.  1.]
 [ 1.  1.  0.  0.  0.  0.  0.  0.  1.  0.  1.  0.]
 [ 1.  1.  1.  0.  1.  0.  0.  0.  1.  1.  0.  0.]
 [ 1.  1.  0.  0.  0.  0.  0.  0.  1.  1.  1.  1.]
 [ 1.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.]
 [ 1.  1.  1.  1.  0.  1.  1.  1.  0.  0.  0.  1.]
 [ 1.  1.  1.  0.  0.  1.  0.  0.  1.  0.  0.  1.]
 [ 1.  1.  0.  0.  0.  1.  1.  0.  1.  0.  1.  1.]
 [ 1.  1.  1.  1.  0.  0.  0.  0.  0.  0.  0.  0.]
 [ 1.  1.  1.  0.  0.  0.  0.  0.  1.  0.  0.  1.]
 [ 0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.]
 [ 1.  1.  0.  1.  0.  0.  0.  0.  0.  0.  1.  0.]
 [ 1.  1.  0.  1.  0.  0.  1.  1.  0.  1.  1.  1.]
 [ 1.  1.  1.  1.  0.  0.  1.  1.  0.  1.  0.  1.]
 [ 1.  1.  0.  0.  1.  0.  0.  0.  1.  0.  1.  0.]
 [ 1.  1.  1.  1.  0.  0.  0.  0.  0.  0.  0.  1.]]

0 个答案:

没有答案