Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 1624 by [email protected]: convex_hull argument handling
http://code.google.com/p/sympy/issues/detail?id=1624
Hi!
I recently found the following issue:
from sympy import *
pts = [Point(Integer(-30), Integer(-21)), Point(Integer(-30),
Integer(-21)), Point(Integer(-30), Integer(-21))]
print convex_hull(pts)
gives:
> pythonw -u "test_bug.py"
Traceback (most recent call last):
File "test_bug.py", line 3, in <module>
print convex_hull(pts)
File "c:\python25\lib\site-packages\sympy\geometry\util.py", line 113, in
convex_hull
return Segment(convexHull[0],convexHull[1])
File "c:\python25\lib\site-packages\sympy\geometry\line.py", line 465, in
__new__
return LinearEntity.__new__(cls, p1, p2, **kwargs)
File "c:\python25\lib\site-packages\sympy\geometry\line.py", line 20, in
__new__
raise RuntimeError("%s.__new__ requires two distinct points" %
cls.__name__)
RuntimeError: Segment.__new__ requires two distinct points
> Exit code: 1
attached, are a test and the corresponding fix.
Attachments:
0001-this-fixes-the-argument-handling-of-convex_hull.patch 2.7 KB
0002-add-another-test.patch 1.2 KB
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---