Skip to content

Commit c6d7f7f

Browse files
committed
style:
1 parent 7aade75 commit c6d7f7f

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

sup3r/bias/bias_transforms.py

+14-6
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,14 @@ def get_spatial_bc_quantiles(lat_lon: np.array,
9999
logger.error(msg)
100100
raise RuntimeError(msg)
101101

102-
msg = (f'Either {dset_base} or {dset_bias} or {dset_bias_fut} not found in {bias_fp}.')
102+
msg = (f'Either {dset_base} or {dset_bias} or {dset_bias_fut} '
103+
'not found in {bias_fp}.')
103104
dsets = [dset.lower() for dset in res.dsets]
104-
check = dset_base.lower() in dsets \
105-
and dset_bias.lower() in dsets \
106-
and dset_bias_fut.lower() in dsets
105+
check = (
106+
dset_base.lower() in dsets
107+
and dset_bias.lower() in dsets
108+
and dset_bias_fut.lower() in dsets
109+
)
107110
assert check, msg
108111
dset_base = res.dsets[dsets.index(dset_base.lower())]
109112
dset_bias = res.dsets[dsets.index(dset_bias.lower())]
@@ -113,7 +116,11 @@ def get_spatial_bc_quantiles(lat_lon: np.array,
113116
bias = res[dset_bias, slice_y, slice_x]
114117
bias_fut = res[dset_bias_fut, slice_y, slice_x]
115118

116-
cfg = {k:v for k,v in res.h5.attrs.items() if k in ("dist", "sampling", "log_base")}
119+
cfg = {
120+
k: v
121+
for k, v in res.h5.attrs.items()
122+
if k in ("dist", "sampling", "log_base")
123+
}
117124

118125
return base, bias, bias_fut, cfg
119126

@@ -401,7 +408,8 @@ def local_qdm_bc(data: np.array,
401408
Notes
402409
-----
403410
Be careful selecting `bias_fp`. Usually, the input `data` used here would
404-
be related to the dataset used to estimate "bias_fut_{feature_name}_params".
411+
be related to the dataset used to estimate
412+
"bias_fut_{feature_name}_params".
405413
406414
Keeping arguments consistent with `local_linear_bc()`, thus a 3D data
407415
(spatial, spatial, temporal), and lat_lon (n_lats, n_lons, [lat, lon]).

0 commit comments

Comments
 (0)