Skip to content

Removed skipna argument from count, any, all [GH755] #4258

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 3 commits into from
Jul 24, 2020
Merged

Removed skipna argument from count, any, all [GH755] #4258

merged 3 commits into from
Jul 24, 2020

Conversation

sjvrijn
Copy link
Contributor

@sjvrijn sjvrijn commented Jul 23, 2020

Could not confirm in the web-based documentation (see #4257), but manually confirmed to work:

>>> import xarray as xr
>>> help(xr.DataArray.count)
Help on function count in module xarray.core.common:

count(self, dim=None, axis=None, **kwargs)
    Reduce this DataArray's data by applying `count` along some dimension(s).

    Parameters
    ----------
    dim : str or sequence of str, optional
        Dimension(s) over which to apply `count`.
    axis : int or sequence of int, optional
        Axis(es) over which to apply `count`. Only one of the 'dim'
        and 'axis' arguments can be supplied. If neither are supplied, then
        `count` is calculated over axes.
    keep_attrs : bool, optional
        If True, the attributes (`attrs`) will be copied from the original
        object to the new one.  If False (default), the new object will be
        returned without attributes.
    **kwargs : dict
        Additional keyword arguments passed on to the appropriate array
        function for calculating `count` on this object's data.

    Returns
    -------
    reduced : DataArray
        New DataArray object with `count` applied to its data and the
        indicated dimension(s) removed.

@sjvrijn
Copy link
Contributor Author

sjvrijn commented Jul 23, 2020

Btw, is there a reason why the functional kwarg keep_attrs has an explanation listed, but isn't listed in the signature? I was unable to find how to update that in the docs when working on this PR.

@dcherian
Copy link
Contributor

Thanks @sjvrijn can you merge the master branch to fix the RTD build? Then we can double check the docs.

@sjvrijn
Copy link
Contributor Author

sjvrijn commented Jul 23, 2020

@dcherian Docs seem to be correct: skipna is removed from DataArray.count, DataArray.any, DataArray.all while still there in e.g. DataArray.sum

Copy link
Contributor

@dcherian dcherian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sjvrijn

@dcherian dcherian merged commit 6c1203a into pydata:master Jul 24, 2020
@max-sixty
Copy link
Collaborator

Thanks @sjvrijn !

@sjvrijn sjvrijn deleted the GH755 branch July 24, 2020 17:38
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

count docstring mistakenly includes skipna
3 participants