tulip-control / polytope

Geometric operations on polytopes of any dimension
https://pypi.org/project/polytope
Other
73 stars 19 forks source link

The numpy boolean negative, the `-` operator, is not supported, use the `~` operator or the logical_not function instead #46

Closed johnyf closed 7 years ago

johnyf commented 7 years ago

With numpy == 1.13.0 the tests break, though the same build used to pass (this numpy version was recently released). The error message below suggests as a possible replacement using the function logical_not.

ERROR: polytope_test.operations_test.polytope_intersect_test

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/home/travis/miniconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest

    self.test(*self.arg)

  File "/home/travis/build/tulip-control/polytope/tests/polytope_test.py", line 197, in polytope_intersect_test

    p5 = p2.intersect(p4)

  File "/home/travis/miniconda/lib/python2.7/site-packages/polytope/polytope.py", line 275, in intersect

    return reduce(Polytope(iA, ib), abs_tol=abs_tol)

  File "/home/travis/miniconda/lib/python2.7/site-packages/polytope/polytope.py", line 1067, in reduce

    (np.array([b_arr]).T-np.dot(A_arr, lb)) < -1e-4)

TypeError: The numpy boolean negative, the `-` operator, is not supported, use the `~` operator or the logical_not function instead.