Skip to content

Unify docstring styles #48

@sandorkertesz

Description

@sandorkertesz

The docstrings varies between modules in earthkit-meteo and would be great if a common style could be used. E.g. 2 variants:

def cdf(self, x):
        """Evaluate the cumulative distribution function (CDF).

        Parameters
        ----------
        x: Number | array_like
            Input value.
def mixing_ratio_from_vapour_pressure(e, p, eps=1e-4):
    r"""Compute the mixing ratio from vapour pressure.

    Parameters
    ----------
    e: number or array-like
        Vapour pressure (Pa)

Other questions:

  • does "array-like" also mean number or we always have to use something like "number or array-like" to indicate that an arg/kwarg can be both a number and array?
  • what typehint should be used for "array-like"?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions