Skip to content

Commit

Permalink
Fix *args, **kwargs
Browse files Browse the repository at this point in the history
"inline emphasis..."
  • Loading branch information
dcherian committed Feb 27, 2019
1 parent 39983a5 commit 1b9da35
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
8 changes: 4 additions & 4 deletions xarray/core/alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _get_joiner(join):


def align(*objects, **kwargs):
"""align(*objects, join='inner', copy=True, indexes=None,
"""align(\*objects, join='inner', copy=True, indexes=None,
exclude=frozenset())
Given any number of Dataset and/or DataArray objects, returns new
Expand All @@ -48,7 +48,7 @@ def align(*objects, **kwargs):
Parameters
----------
*objects : Dataset or DataArray
\*objects : Dataset or DataArray
Objects to align.
join : {'outer', 'inner', 'left', 'right', 'exact'}, optional
Method for joining the indexes of the passed objects along each
Expand All @@ -73,7 +73,7 @@ def align(*objects, **kwargs):
Returns
-------
aligned : same as *objects
aligned : same as \*objects
Tuple of objects with aligned coordinates.
Raises
Expand Down Expand Up @@ -413,7 +413,7 @@ def broadcast(*args, **kwargs):
Parameters
----------
*args : DataArray or Dataset objects
\*args : DataArray or Dataset objects
Arrays to broadcast against each other.
exclude : sequence of str, optional
Dimensions that must not be broadcasted
Expand Down
4 changes: 2 additions & 2 deletions xarray/core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def assign_coords(self, **kwargs):
def assign_attrs(self, *args, **kwargs):
"""Assign new attrs to this object.
Returns a new object equivalent to self.attrs.update(*args, **kwargs).
Returns a new object equivalent to self.attrs.update(\*args, \*\*kwargs).
Parameters
----------
Expand All @@ -374,7 +374,7 @@ def assign_attrs(self, *args, **kwargs):

def pipe(self, func, *args, **kwargs):
"""
Apply func(self, *args, **kwargs)
Apply func(self, \*args, \*\*kwargs)
This method replicates the pandas method of the same name.
Expand Down
16 changes: 8 additions & 8 deletions xarray/core/dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ def load(self, **kwargs):
Parameters
----------
**kwargs : dict
\*\*kwargs : dict
Additional keyword arguments passed on to ``dask.array.compute``.
See Also
Expand All @@ -657,7 +657,7 @@ def compute(self, **kwargs):
Parameters
----------
**kwargs : dict
\*\*kwargs : dict
Additional keyword arguments passed on to ``dask.array.compute``.
See Also
Expand All @@ -676,7 +676,7 @@ def persist(self, **kwargs):
Parameters
----------
**kwargs : dict
\*\*kwargs : dict
Additional keyword arguments passed on to ``dask.persist``.
See Also
Expand Down Expand Up @@ -997,7 +997,7 @@ def interp(self, coords=None, method='linear', assume_sorted=False,
values.
kwargs: dictionary
Additional keyword passed to scipy's interpolator.
**coords_kwarg : {dim: coordinate, ...}, optional
\*\*coords_kwarg : {dim: coordinate, ...}, optional
The keyword arguments form of ``coords``.
One of coords or coords_kwargs must be provided.
Expand Down Expand Up @@ -1579,7 +1579,7 @@ def reduce(self, func, dim=None, axis=None, keep_attrs=None, **kwargs):
----------
func : function
Function which can be called in the form
`f(x, axis=axis, **kwargs)` to return the result of reducing an
`f(x, axis=axis, \*\*kwargs)` to return the result of reducing an
np.ndarray over an integer valued axis.
dim : str or sequence of str, optional
Dimension(s) over which to apply `func`.
Expand All @@ -1592,7 +1592,7 @@ def reduce(self, func, dim=None, axis=None, keep_attrs=None, **kwargs):
If True, the variable's 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
\*\*kwargs : dict
Additional keyword arguments passed on to `func`.
Returns
Expand Down Expand Up @@ -2320,7 +2320,7 @@ def quantile(self, q, dim=None, interpolation='linear', keep_attrs=None):
is a scalar. If multiple percentiles are given, first axis of
the result corresponds to the quantile and a quantile dimension
is added to the return array. The other dimensions are the
dimensions that remain after the reduction of the array.
dimensions that remain after the reduction of the array.
See Also
--------
Expand Down Expand Up @@ -2427,7 +2427,7 @@ def differentiate(self, coord, edge_order=1, datetime_unit=None):
return self._from_temp_dataset(ds)

def integrate(self, dim, datetime_unit=None):
""" integrate the array with the trapezoidal rule.
""" Integrate the array with the trapezoidal rule.
.. note::
This feature is limited to simple cartesian geometry, i.e. coord
Expand Down
16 changes: 8 additions & 8 deletions xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ def load(self: T, **kwargs) -> T:
Parameters
----------
**kwargs : dict
\*\*kwargs : dict
Additional keyword arguments passed on to ``dask.array.compute``.
See Also
Expand Down Expand Up @@ -626,7 +626,7 @@ def compute(self: T, **kwargs) -> T:
Parameters
----------
**kwargs : dict
\*\*kwargs : dict
Additional keyword arguments passed on to ``dask.array.compute``.
See Also
Expand Down Expand Up @@ -663,7 +663,7 @@ def persist(self: T, **kwargs) -> T:
Parameters
----------
**kwargs : dict
\*\*kwargs : dict
Additional keyword arguments passed on to ``dask.persist``.
See Also
Expand Down Expand Up @@ -3046,7 +3046,7 @@ def reduce(self, func, dim=None, keep_attrs=None, numeric_only=False,
----------
func : function
Function which can be called in the form
`f(x, axis=axis, **kwargs)` to return the result of reducing an
`f(x, axis=axis, \*\*kwargs)` to return the result of reducing an
np.ndarray over an integer valued axis.
dim : str or sequence of str, optional
Dimension(s) over which to apply `func`. By default `func` is
Expand All @@ -3057,7 +3057,7 @@ def reduce(self, func, dim=None, keep_attrs=None, numeric_only=False,
object will be returned without attributes.
numeric_only : bool, optional
If True, only apply ``func`` to variables with a numeric dtype.
**kwargs : dict
\*\*kwargs : dict
Additional keyword arguments passed on to ``func``.
Returns
Expand Down Expand Up @@ -3117,7 +3117,7 @@ def apply(self, func, keep_attrs=None, args=(), **kwargs):
Parameters
----------
func : function
Function which can be called in the form `func(x, *args, **kwargs)`
Function which can be called in the form `func(x, \*args, \*\*kwargs)`
to transform each DataArray `x` in this dataset into another
DataArray.
keep_attrs : bool, optional
Expand All @@ -3126,7 +3126,7 @@ def apply(self, func, keep_attrs=None, args=(), **kwargs):
be returned without attributes.
args : tuple, optional
Positional arguments passed on to `func`.
**kwargs : dict
\*\*kwargs : dict
Keyword arguments passed on to `func`.
Returns
Expand Down Expand Up @@ -4109,7 +4109,7 @@ def filter_by_attrs(self, **kwargs):
Parameters
----------
**kwargs : key=value
\*\*kwargs : key=value
key : str
Attribute name.
value : callable or obj
Expand Down

0 comments on commit 1b9da35

Please sign in to comment.