ENH: spatial/qhull: add convex hull + voronoi qhull wrappers, improve docs, add tutorial #377

Merged
merged 63 commits into from Dec 17, 2012

4 participants

@pv
SciPy member
pv commented Dec 7, 2012

This PR completes the Qhull wrappers in scipy.spatial, and adds a tutorial plus some plotting routines.

@jakevdp
SciPy member

Looks very nice! The main thing I was hoping for -- easy access to the points comprising the simplices of the Delaunay tesselation -- seems to be present. Very nice work!

@rgommers
SciPy member

All OK with 2.7, about 45 of these with 3.2:

======================================================================
ERROR: test_interpnd.TestCloughTocher2DInterpolator.test_dense
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.tox/scipy/py32/lib/python3.2/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/rgommers/.tox/scipy/py32/lib/python3.2/site-packages/scipy/interpolate/tests/test_interpnd.py", line 196, in test_dense
    err_msg="Function %d" % j)
  File "/home/rgommers/.tox/scipy/py32/lib/python3.2/site-packages/scipy/interpolate/tests/test_interpnd.py", line 130, in _check_accuracy
    tol=1e-6)
  File "interpnd.pyx", line 1051, in scipy.interpolate.interpnd.CloughTocher2DInterpolator.__init__ (scipy/interpolate/interpnd.c:5554)
  File "qhull.pyx", line 1307, in scipy.spatial.qhull.Delaunay.__init__ (scipy/spatial/qhull.c:9034)
TypeError: Argument 'options' has incorrect type (expected bytes, got str)

======================================================================
ERROR: test_qhull.TestVoronoi.test_ridges('random-2d',)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.tox/scipy/py32/lib/python3.2/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/rgommers/.tox/scipy/py32/lib/python3.2/site-packages/scipy/spatial/tests/test_qhull.py", line 553, in check
    vor = qhull.Voronoi(points)
  File "qhull.pyx", line 1777, in scipy.spatial.qhull.Voronoi.__init__ (scipy/spatial/qhull.c:13520)
TypeError: Argument 'required_options' has incorrect type (expected bytes, got str)
@rgommers
SciPy member

Looks very good to me too!

@rgommers rgommers commented on an outdated diff Dec 8, 2012
doc/release/0.12.0-notes.rst
@@ -39,6 +39,17 @@ count_neighbors and sparse_distance_matrix) are between 200 and 1000 times
faster in cKDTree than in KDTree. With very minor caveats, cKDTree has
exactly the same interface as KDTree, and can be used as a drop-in replacement.
+Voronoi diagrams and convex hulls
+---------------------------------
+`scipy.spatial` contains now functionality for computing Voronoi
@rgommers
SciPy member
rgommers added a line comment Dec 8, 2012

"contains now" --> "now contains"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rgommers rgommers commented on an outdated diff Dec 8, 2012
doc/release/0.12.0-notes.rst
@@ -39,6 +39,17 @@ count_neighbors and sparse_distance_matrix) are between 200 and 1000 times
faster in cKDTree than in KDTree. With very minor caveats, cKDTree has
exactly the same interface as KDTree, and can be used as a drop-in replacement.
+Voronoi diagrams and convex hulls
+---------------------------------
+`scipy.spatial` contains now functionality for computing Voronoi
+diagrams and convex hulls using the Qhull library. (Delaunay
+triangulation was available since Scipy 0.9.0.)
+
+Delaunay improvements
+---------------------
+It's now possible to pass in custom Qhull options in Delaunay
+triangulation. Coplanar points are also now recorded, if present.
@rgommers
SciPy member
rgommers added a line comment Dec 8, 2012

"also now" --> "now also"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rgommers rgommers commented on an outdated diff Dec 8, 2012
doc/source/tutorial/spatial.rst
+``points`` array that make up the triangle. For instance:
+
+>>> i = 1
+>>> tri.simplices[i,:]
+array([3, 0, 2], dtype=int32)
+>>> points[tri.simplices[i,:]]
+array([[1, 1],
+ [0, 0],
+ [1, 0]])
+
+Moreover, neighboring triangles can also be found out:
+
+>>> tri.neighbors[i]
+array([-1, 0, -1], dtype=int32)
+
+What this tells us that this triangle has triangle #0 as a neighbor,
@rgommers
SciPy member
rgommers added a line comment Dec 8, 2012

"us that" --> "us is that"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rgommers rgommers commented on an outdated diff Dec 8, 2012
doc/source/tutorial/spatial.rst
+
+ We can illustrate the above result:
+
+ >>> import matplotlib.pyplot as plt
+ >>> plt.plot(points[:,0], points[:,1], 'o')
+ >>> for simplex in hull.simplices:
+ >>> plt.plot(points[simplex,0], points[simplex,1], 'k-')
+ >>> plt.show()
+
+The same can be achieved with `scipy.spatial.convex_hull_plot_2d`.
+
+
+Voronoi diagrams
+----------------
+
+Voronoi diagram is a subdivision of the space into the nearest
@rgommers
SciPy member
rgommers added a line comment Dec 8, 2012

"A Voronoi"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rgommers rgommers commented on an outdated diff Dec 8, 2012
doc/source/tutorial/spatial.rst
+ due to similar numerical precision issues as in Delaunay triangulation
+ above, there may be fewer Voronoi regions than input points.
+
+ The ridges (lines in 2-D) separating the regions are described as a
+ similar collection of simplices as the convex hull pieces:
+
+ >>> vor.ridge_vertices
+ [[-1, 0], [-1, 0], [-1, 1], [-1, 1], [0, 1], [-1, 3], [-1, 2], [2, 3], [-1, 3], [-1, 2], [0, 2], [1, 3]]
+
+ These numbers indicate indices of the Voronoi vertices making up the
+ line segments. ``-1`` is again a point at infinity --- only four of
+ the 12 lines is a bounded line segment while the others extend to
+ infinity.
+
+ The Voronoi ridges are perpendicular to lines drawn between the
+ of the input points. Which two points each ridge corresponds to,
@rgommers
SciPy member
rgommers added a line comment Dec 8, 2012

typos: remove "of the" and the comma

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rgommers rgommers commented on the diff Dec 8, 2012
scipy/spatial/qhull.pyx
self._transform = None
self._vertex_to_simplex = None
+ # Backwards compatibility (Scipy < 0.12.0)
+ self.vertices = self.simplices
@rgommers
SciPy member
rgommers added a line comment Dec 8, 2012

Do you want to add a note for this in the docstring (and deprecate vertices)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rgommers rgommers commented on the diff Dec 8, 2012
doc/source/tutorial/spatial.rst
+
+ >>> center = points.mean(axis=0)
+ >>> for pointidx, simplex in zip(vor.ridge_points, vor.ridge_vertices):
+ >>> simplex = np.asarray(simplex)
+ >>> if np.any(simplex < 0):
+ >>> i = simplex[simplex >= 0][0] # finite end Voronoi vertex
+ >>> t = points[pointidx[1]] - points[pointidx[0]] # tangent
+ >>> t /= np.linalg.norm(t)
+ >>> n = np.array([-t[1], t[0]]) # normal
+ >>> midpoint = points[pointidx].mean(axis=0)
+ >>> far_point = vor.vertices[i] + np.sign(np.dot(midpoint - center, n)) * n * 100
+ >>> plt.plot([vor.vertices[i,0], far_point[0]],
+ ... [vor.vertices[i,1], far_point[1]], 'k--')
+ >>> plt.show()
+
+This plot can also be created using `scipy.spatial.voronoi_plot_2d`.
@rgommers
SciPy member
rgommers added a line comment Dec 8, 2012

very nice tutorial

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rgommers
SciPy member

The first sentence on qhull.org, which summarizes Qhull functionality, mentions furthest-site Delaunay triangulation and furthest-site Voronoi diagrams. Those seem to have some applications, and seem to be the main thing missing in these wrappers. I don't know anything about that functionality beyond what I just read; do you think that would be useful?

@rgommers rgommers commented on an outdated diff Dec 8, 2012
scipy/spatial/qhull.pyx
- # Save simplex equation info
- for i in xrange(ndim+1):
- equations[j,i] = facet.normal[i]
- equations[j,ndim+1] = facet.offset
+ i = qh_pointid(point)
+ j = qh_pointid(vertex.point)
+ print i, j
@rgommers
SciPy member
rgommers added a line comment Dec 8, 2012

print statement left in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rgommers rgommers and 1 other commented on an outdated diff Dec 8, 2012
doc/source/tutorial/spatial.rst
+>>> points[tri.simplices[i,:]]
+array([[1, 1],
+ [0, 0],
+ [1, 0]])
+
+Moreover, neighboring triangles can also be found out:
+
+>>> tri.neighbors[i]
+array([-1, 0, -1], dtype=int32)
+
+What this tells us that this triangle has triangle #0 as a neighbor,
+but no other neighbors. Moreover, it tells us that neighbor 0 is
+opposite the vertex 1 of the triangle:
+
+>>> points[tri.simplices[i, 1]]
+array([1, 0])
@rgommers
SciPy member
rgommers added a line comment Dec 8, 2012

This should be array([0, 0]).

@pv
SciPy member
pv added a line comment Dec 8, 2012

I think the result here varies depending on which way Qhull splits the triangulation of the square (there are two choices), and I think that varies depending on rounding error and whatnot.

The result here has to be in accordance with the plotted figure though. Not sure how to ensure that.

@rgommers
SciPy member
rgommers added a line comment Dec 8, 2012

Right, this result varies. What if you offset one point so the two choices aren't symmetrical anymore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@pv
SciPy member
pv commented Dec 8, 2012

The furthest-site triang & voronoi could be added. AFAIK, this is simply flipping the upperdelaunay checks.

@rgommers
SciPy member

There seems to be an issue with recovering from errors:

In [10]: tri = Delaunay(points, qhull_options="Qj Pp")  # lower-case j is incorrect
QH7023 qhull warning: unknown 'Q' qhull option j, rest ignored
QH6154 qhull precision error: initial facet 1 is coplanar with the interior point
ERRONEOUS FACET:
....
RuntimeError: Qhull error

In [11]: tri = Delaunay(points, qhull_options="QJ Pp")  # this works without the previous line
...
/home/rgommers/Code/bldscipy/scipy/spatial/qhull.so in scipy.spatial.qhull.Delaunay.__init__ (scipy/spatial/qhull.c:9261)()

/home/rgommers/Code/bldscipy/scipy/spatial/qhull.so in scipy.spatial.qhull._Qhull.close (scipy/spatial/qhull.c:2442)()

RuntimeError: qhull: did not free 96 bytes (1 pieces)
@rgommers rgommers commented on the diff Dec 8, 2012
scipy/spatial/_plotutils.py
@@ -0,0 +1,104 @@
+import numpy as np
+
+__all__ = ['delaunay_plot_2d', 'convex_hull_plot_2d', 'voronoi_plot_2d']
+
+def delaunay_plot_2d(tri):
+ """
+ Plot the given Delaunay triangulation in 2-D
+
+ Parameters
+ ----------
+ tri : scipy.spatial.Delaunay
@rgommers
SciPy member
rgommers added a line comment Dec 8, 2012

append instance. same for other plot docstrings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rgommers rgommers commented on an outdated diff Dec 8, 2012
scipy/spatial/_plotutils.py
+
+def delaunay_plot_2d(tri):
+ """
+ Plot the given Delaunay triangulation in 2-D
+
+ Parameters
+ ----------
+ tri : scipy.spatial.Delaunay
+ Triangulation to plot
+
+ See Also
+ --------
+ matplotlib.pyplot.triplot
+
+ See Also
+ --------
@rgommers
SciPy member
rgommers added a line comment Dec 8, 2012

duplicate See Also sections

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rgommers rgommers commented on an outdated diff Dec 8, 2012
scipy/spatial/_plotutils.py
+
+ See Also
+ --------
+ ConvexHull
+
+ Notes
+ -----
+ Requires Matplotlib.
+
+ """
+ import matplotlib.pyplot as plt
+
+ plt.plot(hull.points[:,0], hull.points[:,1], 'o')
+ for simplex in hull.simplices:
+ plt.plot(hull.points[simplex,0], hull.points[simplex,1], 'k-')
+ plt.show()
@rgommers
SciPy member
rgommers added a line comment Dec 8, 2012

This line should be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rgommers
SciPy member

For the plot functions, I suggest to add an ax=None parameter and return the figure instance. The same as done in https://github.com/statsmodels/statsmodels/blob/master/statsmodels/graphics.

@rgommers rgommers commented on an outdated diff Dec 8, 2012
scipy/spatial/_plotutils.py
+ center = vor.points.mean(axis=0)
+ for pointidx, simplex in zip(vor.ridge_points, vor.ridge_vertices):
+ simplex = np.asarray(simplex)
+ if np.any(simplex < 0):
+ i = simplex[simplex >= 0][0] # finite end Voronoi vertex
+
+ t = vor.points[pointidx[1]] - vor.points[pointidx[0]] # tangent
+ t /= np.linalg.norm(t)
+ n = np.array([-t[1], t[0]]) # normal
+
+ midpoint = vor.points[pointidx].mean(axis=0)
+ far_point = vor.vertices[i] + np.sign(np.dot(midpoint - center, n)) * n * ptp_bound.max()
+
+ plt.plot([vor.vertices[i,0], far_point[0]],
+ [vor.vertices[i,1], far_point[1]], 'k--')
+ plt.xlim(vor.points[:,0].min() - 0.1*ptp_bound[0],
@rgommers
SciPy member
rgommers added a line comment Dec 8, 2012

PEP8 nitpick: blank line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rgommers rgommers commented on an outdated diff Dec 8, 2012
scipy/spatial/qhull.pyx
- try:
- qh_qh.NOerrexit = 1
+ if self.numpoints <= 0:
+ raise ValueError("No points given")
+ if self.ndim < 2:
+ raise ValueError("Need at least 2-D data")
+
+ # Process options
+ options_set = set()
+ if options is not None:
+ options_set.update(options.split())
+ if required_options is not None:
+ options_set.update(required_options.split())
+ if b"QJ" in options_set and b"Qt" in options_set:
+ # not compatible, but safe
+ options_set.remove(b"Qt")
@rgommers
SciPy member
rgommers added a line comment Dec 8, 2012

Raise a warning here?

edit: never mind, this is a default option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rgommers rgommers commented on the diff Dec 8, 2012
scipy/spatial/qhull.pyx
+ coplanar : ndarray of int, shape (ncoplanar, 3)
+ Indices of coplanar points and the corresponding indices of
+ the nearest facets and nearest vertex indices. Coplanar
+ points are input points which were *not* included in the
+ triangulation due to numerical precision issues.
+
+ If option "Qc" is not specified, this list is not computed.
+
+ Notes
+ -----
+ The convex hull is computed using the Qhull libary [Qhull]_.
+
+ References
+ ----------
+ .. [Qhull] http://www.qhull.org/
+
@rgommers
SciPy member
rgommers added a line comment Dec 8, 2012

Example would be useful. Can be the same as in tutorial.

@rgommers
SciPy member
rgommers added a line comment Dec 8, 2012

Same for Voronoi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rgommers
SciPy member

This is already failing in master (32-bit 2.7, spatial.test('full'):

======================================================================
FAIL: test_qhull.TestUtilities.test_more_barycentric_transforms
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/python2.7/dist-packages/numpy/testing/decorators.py", line 146, in skipper_func
    return f(*args, **kwargs)
  File "/home/rgommers/Code/scipy/scipy/spatial/tests/test_qhull.py", line 199, in test_more_barycentric_transforms
    unit_cube_tol=1.5e6*eps)
  File "/home/rgommers/Code/scipy/scipy/spatial/tests/test_qhull.py", line 124, in _check_barycentric_transforms
    assert_(ok.all(), "%s %s" % (err_msg, np.where(~ok)))
  File "/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 34, in assert_
    raise AssertionError(msg)
AssertionError: ndim=4 (array([10627]),)

Maybe can be taken along?

@rgommers
SciPy member

Plotting functions need a test.

@pv
SciPy member
pv commented Dec 8, 2012

This should address all the above comments, and fix a few remaining bugs.

@pv
SciPy member
pv commented Dec 9, 2012

And added support for incremental construction. My comment on the mailing list was in error --- I had an off-by-one bug in the code in the other branch. After that was fixed, everything seems to work...

@rgommers
SciPy member

Crashes for me (32-bit python 2.7, linux):

test_qhull.TestVoronoi.test_incremental('pathological-2', 1) ... Segmentation fault (core dumped)
@pv
SciPy member
pv commented Dec 9, 2012

Backtrace? Valgrind shows nothing for me (32-bit python2.7 on Linux). I'll try it in a VM once more.

@rgommers
SciPy member
$ gdb python
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/bin/python...(no debugging symbols found)...done.
(gdb) run -c "import scipy.spatial as s; s.test()"
Starting program: /usr/bin/python -c "import scipy.spatial as s; s.test()"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Running unit tests for scipy.spatial
NumPy version 1.6.1
NumPy is installed in /usr/lib/python2.7/dist-packages/numpy
SciPy version 0.12.0.dev-efa125d
SciPy is installed in /home/rgommers/Code/bldscipy/scipy
Python version 2.7.3 (default, Aug  1 2012, 05:16:07) [GCC 4.6.3]
nose version 1.1.2
......................................................................................................................................................................................................................................................................................................................................................................................((0, 1), (-1, 0))
((0, 2), (-1, 1))
((0, 4), (0, 1))
((1, 4), (-1, 0))
((2, 4), (-1, 1))
--
((0, 1), (-1, 0))
((0, 2), (-1, 1))
((0, 4), (0, 1))
((1, 4), (-1, 0))
((2, 4), (-1, 1))
.
Program received signal SIGSEGV, Segmentation fault.
qh_mergecycle_all (facetlist=0xa2f9ce0, wasmerge=0xbfffa5ec) at scipy/spatial/qhull/src/merge.c:1857
1857              vertex->delridge= True;
(gdb) bt
#0  qh_mergecycle_all (facetlist=0xa2f9ce0, wasmerge=0xbfffa5ec) at scipy/spatial/qhull/src/merge.c:1857
#1  0xb6439a7e in qh_premerge (apex=0x9cdbe60, maxcentrum=5.5494399714938845e-15, 
    maxangle=1.7976931348623157e+308) at scipy/spatial/qhull/src/merge.c:72
#2  0xb642f355 in qh_addpoint (furthest=0x99ac7d0, facet=<optimized out>, checkdist=0)
    at scipy/spatial/qhull/src/libqhull.c:237
#3  0xb640075c in __pyx_pf_5scipy_7spatial_5qhull_6_Qhull_8add_points (__pyx_v_self=0x994966c, 
    __pyx_v_points=0x96669a0) at scipy/spatial/qhull.c:4179
#4  0x081287ef in PyObject_Call ()
#5  0xb63ff199 in __pyx_pf_5scipy_7spatial_5qhull_10_QhullUser_8add_points (__pyx_v_restart=<optimized out>, 
    __pyx_v_points=0x96669a0, __pyx_v_self=0x9934eec, __pyx_self=<optimized out>)
    at scipy/spatial/qhull.c:12446
#6  __pyx_pw_5scipy_7spatial_5qhull_10_QhullUser_9add_points (__pyx_self=0x87df39c, __pyx_args=0x992cbac, 
    __pyx_kwds=0x0) at scipy/spatial/qhull.c:12140
#7  0x081287ef in PyObject_Call ()
#8  0x081951e6 in PyEval_EvalFrameEx ()
#9  0x0819af70 in PyEval_EvalCodeEx ()
#10 0x0819c82e in ?? ()
#11 0x081287ef in PyObject_Call ()
#12 0x081964bb in PyEval_EvalFrameEx ()
#13 0x08194eec in PyEval_EvalFrameEx ()
#14 0x0819af70 in PyEval_EvalCodeEx ()
#15 0x0819c972 in ?? ()
#16 0x081287ef in PyObject_Call ()
#17 0x081964bb in PyEval_EvalFrameEx ()
#18 0x0819af70 in PyEval_EvalCodeEx ()
#19 0x0819c82e in ?? ()
@pv
SciPy member
pv commented Dec 9, 2012

This should fix the crash.

@rgommers
SciPy member

Yep, seems fixes. One py3k error:

======================================================================
ERROR: test_qhull.Test_Qhull.test_swapping
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.tox/scipy/py32/lib/python3.2/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
  File "/home/rgommers/.tox/scipy/py32/lib/python3.2/site-packages/scipy/spatial/tests/test_qhull.py", line 80, in test_swapping
    'Qz')
TypeError: Argument 'mode_option' has incorrect type (expected bytes, got str)

There's also still a print statement that has to be removed.

@pv
SciPy member
pv commented Dec 9, 2012

Fixed the py3 issue + updated docs.

@rgommers
SciPy member

Works for me now, and last commits look good. Let's leave this open for a few more days, Matt Terry said he wanted to test the incremental mode functionality.

@mrterry

+1 For my particular use case, incrementally adding points was 100x faster than recomputing the triangulation with more points.

FWIW, I was working on a stochastic, hill climbing optimization method. Delaunay is used to identify the region near the current function minimum. This region is iteratively resampled until the answer is converged. https://github.com/mrterry/hadrian_min

@rgommers
SciPy member

Cool. One more rebase --> green button?

pv added some commits Dec 5, 2012
@pv pv ENH: spatial: add ConvexHull 9c195fe
@pv pv ENH: spatial: rename .vertices -> .simplices in Delaunay, for better …
…clarity (but preserve backwards compatibility)
72c8c7c
@pv pv ENH: spatial/qhull: implement Voronoi diagrams bc8509a
@pv pv TST: spatial: add a cross-check for ConvexHull simplices c614f5d
@pv pv BUG: spatial/qhull: if QJ given, don't append Qt 8362e69
@pv pv BUG: spatial/qhull: output infinities similarly to qvoronoi o 2b130d4
@pv pv TST: spatial: add tests for Voronoi 833b4d4
@pv pv GEN: spatial, interpolate: regenerate files 899a8e4
@pv pv TST: spatial/qhull: test QJ option 5b78290
@pv pv DOC: spatial: update documentation re qhull, and add some background …
…information
d283acb
@pv pv ENH: spatial/qhull: record coplanar points 69ef9a3
@pv pv DOC: spatial/qhull: update versionadded ed68230
@pv pv ENH: spatial: add some plotting routines, for beginners and convenience d07cd57
@pv pv DOC: add scipy.spatial tutorial c06e2dd
@pv pv DOC: update release notes re qhull changes 79b2bc6
@pv pv DOC: tutorial/spatial: fix markup, plots, etc. e1b276e
@pv pv DOC: tutorial/spatial: fix title levels c6c2698
@pv pv BUG: spatial/qhull: free memory on error conditions, and free all memory 14e3831
@pv pv ENH: spatial/_plotutils: improve interface and docs
Make plot funcs accept given axis, return the figure, deal with hold
status, and adjust the axes bounds. Fix issues in docstrings.
502ecbb
@pv pv GEN: spatial/qhull: regenerate files 8150cc1
@pv pv BUG: spatial/qhull: fix for Python 3 ef1bcbd
@pv pv BUG: spatial/qhull: remove Qt only from required options if QJ was gi…
…ven by the user
521821e
@pv pv GEN: spatial/qhull: regenerate files b6d6b4c
@pv pv MAINT: spatial: remove generate_qhull.py -- just use Cython directly 6ee13a0
@pv pv DOC: fix typos in release notes and spatial tutorial 65c7531
@pv pv BUG: spatial/qhull: another Python 3 fix b2fc70d
@pv pv BUG: spatial/qhull: fix inverted qhull_options check, remove spurious…
… print statements, and adjust Voronoi default parameters
5bf6c50
@pv pv GEN: spatial/qhull: regenerate 05ce9aa
@pv pv DOC: tutorial/spatial: make triangulation always well-defined cc827e8
@pv pv BUG: spatial/qhull: fix crash due to point at infinity bc1c5d6
@pv pv BUG: spatial/qhull: report point at infinity Voronoi region similarly…
… to 'qvoronoi o'
5bdd16d
@pv pv GEN: spatial/qhull: regenerate 63a2b1f
@pv pv TST: spatial: add tests for plot utils bd19d7b
@pv pv ENH: spatial/qhull: support furthest-site Delaunay and Voronoi 0f2ebb9
@pv pv GEN: spatial/qhull: regenerate bd37728
@pv pv BUG: spatial/_plotutils: matplotlib's triplot may modify the simplice…
…s -- make a copy
3ae16e4
@pv pv ENH: spatial/qhull: upgrade Qhull to version 2012.1 3c03c49
@pv pv DOC: tutorial/spatial: fix the delaunay example a bit 45f2d96
@pv pv DOC: spatial/qhull: add examples df5813b
@pv pv GEN: spatial/qhull: regenerate fde16f3
@pv pv TST: spatial: bump test tolerance 68aa0de
@pv pv BUG: spatial/qhull: work around issues on Python 2.4 490017b
@pv pv GEN: spatial/qhull: regenerate 1690397
@pv pv ENH: spatial/qhull: use qh_QHpointer 4e52583
@pv pv BUG: spatial/qhull: include correct header 21b6dc3
@pv pv GEN: spatial/qhull: regenerate files 9d3810f
@pv pv ENH: spatial/qhull: deal with swapping Qhull global state
This allows functionality that requires keeping the Qhull state around,
such as on-line addition of new points.
a31908a
@pv pv ENH: spatial/qhull: add support for incremental construction e18d6b7
@pv pv GEN: spatial/qhull: regenerate files d0b9214
@pv pv GEN: spatial/qhull: regenerate files 2548089
@pv pv BUG: spatial/qhull: straighten out issues with the incremental mode
Fix a bug in point ID maintenance.  The triangulation needs to be told
that it is invalidated.  Also, add an option to do a restarted operation
in the middle of an incremental one.
43fe048
@pv pv TST: spatial/qhull: add tests for the incremental mode 82c36c4
@pv pv GEN: spatial/qhull: regenerate files 39cecf4
@pv pv BUG: spatial/qhull: cherry-pick previous qhull fixes
bb4c46f BUG: spatial/qhull: fix compilation on Intel compilers

The other fixes were already incorporated upstream:

666f6ad BUG: spatial/qhull: define ptr_intT correctly in Qhull
e089c85 MAINT: fix some build warnings.  Closes ticket 1528.
7b500f9
@pv pv DOC: update release notes re incremental qhull mode 77f5845
@pv pv BUG: spatial/qhull: don't clobber facet.center in get_voronoi_diagram 7d03335
@pv pv GEN: spatial/qhull: regenerate files 1373619
@pv pv BUG: spatial/qhull: fix function prototype e0896aa
@pv pv GEN: spatial/qhull: regenerate files df84d9e
@pv pv TST: spatial/qhull: test qhull instance closing, too 9aed973
@pv pv TST: spatial: Python 3 fix + remove debug print 0f00b14
@pv pv DOC: spatial: update docstrings, including the signatures 3fd34f3
@pv pv GEN: spatial/qhull: regenerate files 36e2e1d
@pv
SciPy member
pv commented Dec 17, 2012

Rebased. I'll go ahead and merge it.

@pv pv merged commit d0ddf54 into scipy:master Dec 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment