Skip to content

Commit

Permalink
DOC: Fix a couple Sphinx warnings
Browse files Browse the repository at this point in the history
This fixes the following warnings:
```
/usr/lib/python3.12/site-packages/numpydoc/docscrape.py:455: UserWarning:
potentially wrong underline length...
See Also
--------- in
Construct a weights object from a collection of arbitrary polygons. This
will cast the polygons to PySAL polygons, then build the W....
in the docstring of from_iterable in libpysal/weights/contiguity.py.

libpysal/graph/base.py:docstring of libpysal.graph.base.Graph.build_triangulation:36: WARNING: Bullet list ends without a blank line; unexpected unindent.
```
  • Loading branch information
QuLogic committed Jun 26, 2024
1 parent 49c2610 commit 69190d2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
25 changes: 14 additions & 11 deletions libpysal/graph/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1151,17 +1151,20 @@ def build_triangulation(
Clipping method when ``method="voronoi"``. Ignored otherwise.
Default is ``'bounding_box'``. Options are as follows.
* ``None`` -- No clip is applied. Voronoi cells may be arbitrarily
larger that the source map. Note that this may lead to cells that are many
orders of magnitude larger in extent than the original map. Not recommended.
* ``'bounding_box'`` -- Clip the voronoi cells to the
bounding box of the input points.
* ``'convex_hull'`` -- Clip the voronoi cells to the convex hull of
the input points.
* ``'alpha_shape'`` -- Clip the voronoi cells to the tightest hull that
contains all points (e.g. the smallest alpha shape, using
:func:`libpysal.cg.alpha_shape_auto`).
* ``shapely.Polygon`` -- Clip to an arbitrary Polygon.
``None``
No clip is applied. Voronoi cells may be arbitrarily larger that the
source map. Note that this may lead to cells that are many orders of
magnitude larger in extent than the original map. Not recommended.
``'bounding_box'``
Clip the voronoi cells to the bounding box of the input points.
``'convex_hull'``
Clip the voronoi cells to the convex hull of the input points.
``'alpha_shape'``
Clip the voronoi cells to the tightest hull that contains all points
(e.g. the smallest alpha shape, using
:func:`libpysal.cg.alpha_shape_auto`).
``shapely.Polygon``
Clip to an arbitrary Polygon.
rook : bool, optional
Contiguity method when ``method="voronoi"``. Ignored otherwise.
Expand Down
7 changes: 4 additions & 3 deletions libpysal/weights/contiguity.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,9 @@ def from_shapefile(cls, filepath, idVariable=None, full=False, **kwargs):
@classmethod
def from_iterable(cls, iterable, sparse=False, **kwargs):
"""
Construct a weights object from a collection of arbitrary polygons. This
will cast the polygons to PySAL polygons, then build the W.
Construct a weights object from a collection of arbitrary polygons.
This will cast the polygons to PySAL polygons, then build the W.
Parameters
----------
Expand All @@ -417,7 +418,7 @@ def from_iterable(cls, iterable, sparse=False, **kwargs):
optional arguments for :class:`pysal.weights.W`
See Also
---------
--------
:class:`libpysal.weights.weights.W`
:class:`libpysal.weights.contiguiyt.Queen`
"""
Expand Down

0 comments on commit 69190d2

Please sign in to comment.