Skip to content

Commit

Permalink
Merge pull request #23 from pstradio/integration_qa4sm_tests
Browse files Browse the repository at this point in the history
Fix bug in qa4sm test integration
  • Loading branch information
pstradio authored Jun 7, 2021
2 parents 56f7a95 + 4736930 commit a4bbb51
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/qa4sm_reader/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def boxplot_basic(
# put all Variables in the same dataframe
values = pd.concat(values)
# values are all Nan or NaNf - not plotted
if df.isnull().values.all():
if np.isnan(values.to_numpy()).all():
return None
# create plot
fig, ax = self._boxplot_definition(
Expand Down Expand Up @@ -540,7 +540,7 @@ def boxplot_tc( # todo: set limits to show confidence intervals
dfs, Var = values
df = pd.concat(dfs)
# values are all Nan or NaNf - not plotted
if df.isnull().values.all():
if np.isnan(df.to_numpy()).all():
continue
# necessary if statement to prevent key error when no CIs are in the netCDF
if ci:
Expand Down Expand Up @@ -663,7 +663,7 @@ def mapplot_metric(
"""
fnames = []
for Var in self.img._iter_vars(**{'metric':metric}):
if not (Var.values.isnull().values.all() or Var.is_CI):
if not (np.isnan(Var.values.to_numpy()).all() or Var.is_CI):
fns = self.mapplot_var(Var,
out_name=None,
out_types=out_types,
Expand Down

0 comments on commit a4bbb51

Please sign in to comment.