Skip to content

Commit 3167a11

Browse files
committed
Format with latest version of black
1 parent be8eea4 commit 3167a11

File tree

11 files changed

+22
-25
lines changed

11 files changed

+22
-25
lines changed

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def set_root():
217217
latex_elements = {
218218
"papersize": "a4paper",
219219
"pointsize": "10pt",
220-
"preamble": latex_preamble
220+
"preamble": latex_preamble,
221221
# Latex figure (float) alignment
222222
#
223223
# 'figure_align': 'htbp',

pysteps/decorators.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,9 @@ def _interpolator_with_preamble(xy_coord, values, xgrid, ygrid, **kwargs):
228228
indy = 0
229229
for subygrid in subygrids:
230230
deltay = subygrid.size
231-
interpolated[
232-
:, indy : (indy + deltay), indx : (indx + deltax)
233-
] = interpolator(xy_coord, values, subxgrid, subygrid, **kwargs)
231+
interpolated[:, indy : (indy + deltay), indx : (indx + deltax)] = (
232+
interpolator(xy_coord, values, subxgrid, subygrid, **kwargs)
233+
)
234234
indy += deltay
235235
indx += deltax
236236

pysteps/io/importers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,9 +1366,9 @@ def import_odim_hdf5(filename, qty="RATE", **kwargs):
13661366
mask = np.logical_and(~mask_u, ~mask_n)
13671367
quality = np.empty(arr.shape) # , dtype=float)
13681368
quality[mask] = arr[mask] * gain + offset
1369-
quality[
1370-
~mask
1371-
] = np.nan # a qui -----------------------------
1369+
quality[~mask] = (
1370+
np.nan
1371+
) # a qui -----------------------------
13721372

13731373
if precip is None:
13741374
raise IOError("requested quantity %s not found" % qty)

pysteps/noise/fftgenerators.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -708,9 +708,7 @@ def initialize_nonparam_2d_nested_filter(field, gridres=1.0, **kwargs):
708708
# update indices
709709
level += 1
710710
Idxi, Idxj = _split_field((0, dim[0]), (0, dim[1]), 2**level)
711-
Idxipsd, Idxjpsd = _split_field(
712-
(0, 2**max_level), (0, 2**max_level), 2**level
713-
)
711+
Idxipsd, Idxjpsd = _split_field((0, 2**max_level), (0, 2**max_level), 2**level)
714712

715713
return {"field": F, "input_shape": field.shape[1:], "use_full_fft": True}
716714

pysteps/nowcasts/linda.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,7 @@ def _compute_window_weights(coords, grid_height, grid_width, window_radius):
572572
dx = c[1] - grid_x
573573

574574
w[i, :] = np.exp(
575-
-dy * dy / (2 * window_radius_1**2)
576-
- dx * dx / (2 * window_radius_2**2)
575+
-dy * dy / (2 * window_radius_1**2) - dx * dx / (2 * window_radius_2**2)
577576
)
578577
else:
579578
w[0, :] = np.ones((grid_height, grid_width))

pysteps/nowcasts/sseps.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -729,12 +729,12 @@ def worker(j):
729729
else:
730730
EPS_ = None
731731
# apply AR(p) process to cascade level
732-
precip_cascades[
733-
i, :, :, :
734-
] = autoregression.iterate_ar_model(
735-
precip_cascades[i, :, :, :],
736-
phi[m, n, i, :],
737-
eps=EPS_,
732+
precip_cascades[i, :, :, :] = (
733+
autoregression.iterate_ar_model(
734+
precip_cascades[i, :, :, :],
735+
phi[m, n, i, :],
736+
eps=EPS_,
737+
)
738738
)
739739
EPS_ = None
740740
rc[m][n][j] = precip_cascades.copy()

pysteps/scripts/fit_vel_pert_params.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@
5151
mu = dp_perp_sum / dp_perp_n
5252

5353
std_perp.append(
54-
np.sqrt(
55-
(dp_perp_sq_sum - 2 * mu * dp_perp_sum + dp_perp_n * mu**2) / dp_perp_n
56-
)
54+
np.sqrt((dp_perp_sq_sum - 2 * mu * dp_perp_sum + dp_perp_n * mu**2) / dp_perp_n)
5755
)
5856

5957
try:

pysteps/tests/helpers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
55
Collection of helper functions for the testing suite.
66
"""
7+
78
from datetime import datetime
89

910
import numpy as np

pysteps/tests/test_motion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ def test_vet_padding():
349349
verbose=False,
350350
sectors=((16, 4, 2), (16, 4, 2)),
351351
options=dict(maxiter=5),
352-
padding=padding
352+
padding=padding,
353353
# We use only a few iterations since
354354
# we don't care about convergence in this test
355355
)

pysteps/utils/interface.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ def donothing(R, metadata=None, *args, **kwargs):
205205
methods_objects["rm_rdisc"] = spectral.remove_rain_norain_discontinuity
206206

207207
# tapering methods
208-
methods_objects[
209-
"compute_mask_window_function"
210-
] = tapering.compute_mask_window_function
208+
methods_objects["compute_mask_window_function"] = (
209+
tapering.compute_mask_window_function
210+
)
211211
methods_objects["compute_window_function"] = tapering.compute_window_function
212212

213213
# transformation methods

pysteps/visualization/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
get_geogrid
1414
get_basemap_axis
1515
"""
16+
1617
import warnings
1718

1819
import matplotlib.pylab as plt

0 commit comments

Comments
 (0)