From 43d98c3f1ea8042f2bffebd3fcb3dc8b9f1e5682 Mon Sep 17 00:00:00 2001 From: Huite Bootsma Date: Fri, 23 Aug 2024 16:11:07 +0200 Subject: [PATCH] Changelog, docstring --- docs/changelog.rst | 6 +++++- xugrid/ugrid/ugrid1d.py | 1 + xugrid/ugrid/ugrid2d.py | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index faae98838..a59da3c34 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -21,14 +21,18 @@ Fixed Added ~~~~~ -- :meth:`UgridDataArrayAccessor.interpolate_na` has been added to fill missing +- :meth:`xugrid.UgridDataArrayAccessor.interpolate_na` has been added to fill missing data. Currently, the only supported method is ``"nearest"``. +- :attr:`xugrid.Ugrid1.dims` and :attr:`xugrid.Ugrid2.dims` have been added to + return a tuple of the UGRID dimensions. Changed ~~~~~~~ - Selection operations such as :meth:`UgridDataArrayAccessor.sel_points` will now also return points that are located on the edges of 2D topologies. +- :attr:`xugrid.Ugrid1d.dimensions` and :attr:`xugrid.Ugrid2d.dimensions` now + raise a FutureWarning; use ``.dims`` or ``.sizes`` instead. [0.11.2] 2024-08-16 ------------------- diff --git a/xugrid/ugrid/ugrid1d.py b/xugrid/ugrid/ugrid1d.py index bb1b42ea7..61bd9b94b 100644 --- a/xugrid/ugrid/ugrid1d.py +++ b/xugrid/ugrid/ugrid1d.py @@ -263,6 +263,7 @@ def core_dimension(self): @property def dims(self): + """Tuple of UGRID dimension names: node dimension, edge dimension.""" # Tuple to preserve order, unlike set. return (self.node_dimension, self.edge_dimension) diff --git a/xugrid/ugrid/ugrid2d.py b/xugrid/ugrid/ugrid2d.py index 2282b3531..5abda222d 100644 --- a/xugrid/ugrid/ugrid2d.py +++ b/xugrid/ugrid/ugrid2d.py @@ -415,6 +415,7 @@ def core_dimension(self): @property def dims(self): + """Tuple of UGRID dimension names: node dimension, edge dimension, face_dimension.""" # Tuple to preserve order, unlike set. return ( self.node_dimension,