Skip to content

Commit

Permalink
some formatting cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
coxipi committed Aug 2, 2024
1 parent 71373a8 commit d6968af
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/xsdba/indicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
from functools import reduce
from inspect import Parameter as _Parameter
from inspect import Signature
from inspect import _empty as _empty_default # noqa
from inspect import _empty as _empty_default
from inspect import signature
from os import PathLike
from pathlib import Path
Expand Down Expand Up @@ -802,7 +802,7 @@ def __call__(self, *args, **kwds):
# params : OrderedDict of parameters (var_kwargs as a single argument, if any)

if self._version_deprecated:
self._show_deprecation_warning() # noqa
self._show_deprecation_warning()

das, params, dsattrs = self._parse_variables_from_call(args, kwds)

Expand Down
2 changes: 1 addition & 1 deletion src/xsdba/locales.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""
"""# noqa: SS01
Internationalization
====================
Expand Down
6 changes: 2 additions & 4 deletions src/xsdba/nbutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def quantile(da: DataArray, q: np.ndarray, dim: str | Sequence[Hashable]) -> Dat
nogil=True,
cache=False,
)
def remove_NaNs(x): # noqa
def remove_NaNs(x):
"""Remove NaN values from series."""
remove = np.zeros_like(x[0, :], dtype=boolean)
for i in range(x.shape[0]):
Expand Down Expand Up @@ -386,9 +386,7 @@ def _first_and_last_nonnull(arr):
nogil=True,
cache=False,
)
def _extrapolate_on_quantiles(
interp, oldx, oldg, oldy, newx, newg, method="constant"
): # noqa
def _extrapolate_on_quantiles(interp, oldx, oldg, oldy, newx, newg, method="constant"):
"""Apply extrapolation to the output of interpolation on quantiles with a given grouping.
Arguments are the same as _interp_on_quantiles_2D.
Expand Down
8 changes: 4 additions & 4 deletions src/xsdba/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,12 +581,12 @@ def to_additive_space(
raise NotImplementedError("`trans` must be one of 'log' or 'logit'.")

# Attributes to remember all this.
out = out.assign_attrs(sdba_transform=trans)
out = out.assign_attrs(sdba_transform_lower=lower_bound_array)
out = out.assign_attrs(xsdba_transform=trans)
out = out.assign_attrs(xsdba_transform_lower=lower_bound_array)
if upper_bound is not None:
out = out.assign_attrs(sdba_transform_upper=upper_bound_array)
out = out.assign_attrs(xsdba_transform_upper=upper_bound_array)
if "units" in out.attrs:
out = out.assign_attrs(sdba_transform_units=out.attrs.pop("units"))
out = out.assign_attrs(xsdba_transform_units=out.attrs.pop("units"))
out = out.assign_attrs(units="")
return out

Expand Down

0 comments on commit d6968af

Please sign in to comment.