Skip to content

Commit

Permalink
DOC: add versionadded note to new functions or keywords for 2.1 (#2013)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche committed Mar 16, 2024
1 parent 2425389 commit 8e53b9e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 1 deletion.
8 changes: 7 additions & 1 deletion shapely/constructive.py
Expand Up @@ -539,10 +539,14 @@ def make_valid(geometry, method="linework", keep_collapsed=True, **kwargs):
method : {'linework', 'structure'}, default 'linework'
Algorithm to use when repairing geometry. 'structure'
requires GEOS >= 3.10.
.. versionadded:: 2.1.0
keep_collapsed : bool, default True
For the 'structure' method, True will keep components that have collapsed into a
lower dimensionality. For example, a ring collapsing to a line, or a line
collapsing to a point. Must be True for the 'linework' method.
.. versionadded:: 2.1.0
**kwargs
See :ref:`NumPy ufunc docs <ufuncs.kwargs>` for other keyword arguments.
Expand Down Expand Up @@ -1027,7 +1031,9 @@ def voronoi_polygons(
ordered : bool or array_like, default False
If set to True, polygons within the GeometryCollection will be ordered
according to the order of the input vertices. Note that this may slow
down the computation. Requires GEOS >= 3.12.0
down the computation. Requires GEOS >= 3.12.0.
.. versionadded:: 2.1.0
**kwargs
See :ref:`NumPy ufunc docs <ufuncs.kwargs>` for other keyword arguments.
Expand Down
2 changes: 2 additions & 0 deletions shapely/coordinates.py
Expand Up @@ -44,6 +44,8 @@ def transform(
one-dimensional arrays (x, y and optional z) instead of a single
two-dimensional array.
.. versionadded:: 2.1.0
See Also
--------
has_z : Returns a copy of a geometry array with a function applied to its
Expand Down
7 changes: 7 additions & 0 deletions shapely/creation.py
Expand Up @@ -71,6 +71,8 @@ def points(
- 'error': if any NaN or Inf is detected in the coordinates, a ValueError
is raised. This option ensures that the created geometries have all
finite coordinate values.
.. versionadded:: 2.1.0
out : ndarray, optional
An array (with dtype object) to output the geometries into.
**kwargs
Expand Down Expand Up @@ -141,6 +143,8 @@ def linestrings(
is raised. This option ensures that the created geometries have all
finite coordinate values.
.. versionadded:: 2.1.0
out : ndarray, optional
An array (with dtype object) to output the geometries into.
**kwargs
Expand Down Expand Up @@ -210,6 +214,9 @@ def linearrings(
- 'error': if any NaN or Inf is detected in the coordinates, a ValueError
is raised. This option ensures that the created geometries have all
finite coordinate values.
.. versionadded:: 2.1.0
out : ndarray, optional
An array (with dtype object) to output the geometries into.
**kwargs
Expand Down
2 changes: 2 additions & 0 deletions shapely/geometry/base.py
Expand Up @@ -758,6 +758,8 @@ def equals_exact(self, other, tolerance=0.0, normalize=False):
If True, normalize the two geometries so that the coordinates are
in the same order.
.. versionadded:: 2.1.0
Examples
--------
>>> LineString(
Expand Down
4 changes: 4 additions & 0 deletions shapely/predicates.py
Expand Up @@ -74,6 +74,8 @@ def has_z(geometry, **kwargs):
def has_m(geometry, **kwargs):
"""Returns True if a geometry has M coordinates.
.. versionadded:: 2.1.0
Parameters
----------
geometry : Geometry or array_like
Expand Down Expand Up @@ -980,6 +982,8 @@ def equals_exact(a, b, tolerance=0.0, normalize=False, **kwargs):
normalize : bool, optional (default: False)
If True, normalize the two geometries so that the coordinates are
in the same order.
.. versionadded:: 2.1.0
**kwargs
See :ref:`NumPy ufunc docs <ufuncs.kwargs>` for other keyword arguments.
Expand Down

0 comments on commit 8e53b9e

Please sign in to comment.