Skip to content

Commit

Permalink
Merge pull request scipy#8581 from oleksandr-pavlyk/fix-qhull-pyx
Browse files Browse the repository at this point in the history
Fix Cython 0.28 build break of qhull.pyx
  • Loading branch information
rgommers authored Mar 24, 2018
2 parents 7087823 + 7c4d744 commit b00aa14
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions scipy/spatial/qhull.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2158,7 +2158,16 @@ def tsearch(tri, xi):
"""
return tri.find_simplex(xi)

Delaunay.add_points.__func__.__doc__ = _QhullUser._add_points.__doc__
# Set docstring for foo to docstring of bar, working around change in Cython 0.28
# See https://github.com/scipy/scipy/pull/8581
def _copy_docstr(dst, src):
try:
dst.__doc__ = src.__doc__
except AttributeError:
dst.__func__.__doc__ = src.__func__.__doc__


_copy_docstr(Delaunay.add_points, _QhullUser._add_points)

#------------------------------------------------------------------------------
# Delaunay triangulation interface, for low-level C
Expand Down Expand Up @@ -2353,7 +2362,7 @@ class ConvexHull(_QhullUser):
self._vertices = np.unique(self.simplices)
return self._vertices

ConvexHull.add_points.__func__.__doc__ = _QhullUser._add_points.__doc__
_copy_docstr(ConvexHull.add_points, _QhullUser._add_points)

#------------------------------------------------------------------------------
# Voronoi diagrams
Expand Down Expand Up @@ -2505,7 +2514,8 @@ class Voronoi(_QhullUser):
self.ridge_vertices))
return self._ridge_dict

Voronoi.add_points.__func__.__doc__ = _QhullUser._add_points.__doc__

_copy_docstr(Voronoi.add_points, _QhullUser._add_points)

#------------------------------------------------------------------------------
# Halfspace Intersection
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/appveyor/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
numpy
cython==0.27.3
cython
pytest-timeout
pytest-xdist
pytest-env
Expand Down

0 comments on commit b00aa14

Please sign in to comment.