Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/modelskill/comparison/_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ def gridded_skill(
by: str | Iterable[str] | None = None,
metrics: Iterable[str] | Iterable[Callable] | str | Callable | None = None,
n_min: Optional[int] = None,
**kwargs: Any,
**_kwargs: Any,
) -> SkillGrid:
"""Skill assessment of model(s) on a regular spatial grid.

Expand Down
3 changes: 1 addition & 2 deletions src/modelskill/comparison/_collection_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,15 +343,14 @@ def hist(
self,
bins: int | Sequence = 100,
*,
model: str | int | None = None,
title: Optional[str] = None,
density: bool = True,
alpha: float = 0.5,
ax=None,
figsize: Optional[Tuple[float, float]] = None,
**kwargs,
):
"""Plot histogram of specific model and all observations.
"""Plot histogram of all models and observations.

Wraps pandas.DataFrame hist() method.

Expand Down
1 change: 0 additions & 1 deletion src/modelskill/comparison/_comparer_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,6 @@ def box(self, *, ax=None, title=None, figsize=None, **kwargs):
def scatter(
self,
*,
model=None,
bins: int | float = 120,
quantiles: int | Sequence[float] | None = None,
fit_to_quantiles: bool = False,
Expand Down
2 changes: 1 addition & 1 deletion src/modelskill/comparison/_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ def gridded_skill(
by: str | Iterable[str] | None = None,
metrics: Iterable[str] | Iterable[Callable] | str | Callable | None = None,
n_min: int | None = None,
**kwargs: Any,
**_kwargs: Any,
):
"""Aggregated spatial skill assessment of model(s) on a regular spatial grid.

Expand Down
4 changes: 2 additions & 2 deletions src/modelskill/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ def from_config(
for name, data in conf["observations"].items():
if data.pop("include", True):
data["name"] = name
observations.append(_obs_from_dict(name, data, dirname, relative_path))
observations.append(_obs_from_dict(data, dirname, relative_path))

return match(obs=observations, mod=modelresults)


def _obs_from_dict(
name: str, obs_dict: dict, dirname: Path, relative_path: bool
obs_dict: dict, dirname: Path, relative_path: bool
) -> PointObservation | TrackObservation:
fp = Path(obs_dict.pop("filename"))
if relative_path:
Expand Down
4 changes: 2 additions & 2 deletions src/modelskill/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,11 +753,11 @@ def _linear_regression(
return slope, intercept


def _std_obs(obs: ArrayLike, model: ArrayLike) -> Any:
def _std_obs(obs: ArrayLike, _model: Any) -> Any:
return obs.std()


def _std_mod(obs: ArrayLike, model: ArrayLike) -> Any:
def _std_mod(_obs: Any, model: ArrayLike) -> Any:
return model.std()


Expand Down
4 changes: 2 additions & 2 deletions src/modelskill/plotting/_scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,13 +428,13 @@ def _scatter_plotly(
x_trend,
show_density,
show_points,
norm, # TODO not used by plotly, remove or keep for consistency?
_norm, # Not used by plotly, kept for API consistency
show_hist,
nbins_hist,
reg_method,
xlabel,
ylabel,
figsize, # TODO not used by plotly, remove or keep for consistency?
_figsize, # Not used by plotly, kept for API consistency
xlim,
ylim,
title,
Expand Down
2 changes: 1 addition & 1 deletion src/modelskill/plotting/_taylor_diagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def taylor_diagram(
figsize: tuple[float, float] = (7, 7),
obs_text: str = "Observations",
normalize_std: bool = False,
ax: Axes | None = None,
_ax: Axes | None = None, # Not yet implemented
title: str = "Taylor diagram",
) -> matplotlib.figure.Figure:
"""
Expand Down
5 changes: 2 additions & 3 deletions src/modelskill/skill.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,12 +656,11 @@ def query(self, query: str) -> SkillTable:
return self.__class__(self.data.query(query))

def sel(
self, query: str | None = None, reduce_index: bool = True, **kwargs: Any
self, reduce_index: bool = True, **kwargs: Any
) -> SkillTable | SkillArray:
"""Filter (select) specific models or observations.

Select a subset of the SkillTable by a query,
(part of) the index, or specific columns
Select a subset of the SkillTable by (part of) the index.

Parameters
----------
Expand Down