Skip to content

Document that Dataset.update defaults to being inplace. #2951

Closed
@nebain

Description

@nebain

It is not documented that the inplace argument to Dataset.update defaults to True, in a departure from every other place where the inplace argument exists (I see this was briefly mentioned in #1756).

Currently the documentation reads:

Dataset.update(other, inplace=None)
...
inplace:bool, optional
If True, merge the other dataset into this dataset in-place. Otherwise, return a new dataset object.

I had to dig into the source code to understand why new_ds = ds.update(changes) was causing changes to ds. It needs to be documented that update is one of the few mutable functions on a dataset.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions