File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,9 @@ Deprecations
7979 For now using ``dim `` issues a ``FutureWarning ``. It will be removed in
8080 version 0.19.0 (:pull: `3993 `).
8181 By `Tom Nicholas <https://github.com/TomNicholas >`_.
82+ - the return value of :py:meth: `Dataset.update ` is being deprecated to make it work more
83+ like :py:meth: `dict.update `. It will be removed in version 0.19.0 (:pull: `4932 `).
84+ By `Justus Magin <https://github.com/keewis >`_.
8285
8386
8487New Features
@@ -181,6 +184,8 @@ Documentation
181184- add concat examples and improve combining documentation (:issue: `4620 `, :pull: `4645 `).
182185 By `Ray Bell <https://github.com/raybellwaves >`_ and
183186 `Justus Magin <https://github.com/keewis >`_.
187+ - explicitly mention that :py:meth: `Dataset.update ` updates inplace (:issue: `2951 `, :pull: `4932 `).
188+ By `Justus Magin <https://github.com/keewis >`_.
184189
185190Internal Changes
186191~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -3865,6 +3865,8 @@ def unstack(
38653865 def update (self , other : "CoercibleMapping" ) -> "Dataset" :
38663866 """Update this dataset's variables with those from another dataset.
38673867
3868+ Just like :py:meth:`dict.update` this is a in-place operation.
3869+
38683870 Parameters
38693871 ----------
38703872 other : Dataset or mapping
@@ -3879,13 +3881,20 @@ def update(self, other: "CoercibleMapping") -> "Dataset":
38793881 Returns
38803882 -------
38813883 updated : Dataset
3882- Updated dataset.
3884+ Updated dataset. Note that since the update is in-place this is the input
3885+ dataset.
3886+
3887+ It is deprecated since version 0.17 and scheduled to be removed in 0.19.
38833888
38843889 Raises
38853890 ------
38863891 ValueError
38873892 If any dimensions would have inconsistent sizes in the updated
38883893 dataset.
3894+
3895+ See Also
3896+ --------
3897+ Dataset.assign
38893898 """
38903899 merge_result = dataset_update_method (self , other )
38913900 return self ._replace (inplace = True , ** merge_result ._asdict ())
You can’t perform that action at this time.
0 commit comments