Skip to content

Commit b1dbdc3

Browse files
actions-userAction black fromatter
authored and
Action black fromatter
committed
Apply automatic changes
1 parent 5ebde30 commit b1dbdc3

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

fimpy/alignment/reg_from_skimage.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def register_translation(
247247
# Center of output array at dftshift + 1
248248
dftshift = np.fix(upsampled_region_size / 2.0)
249249
upsample_factor = np.array(upsample_factor, dtype=np.float64)
250-
normalization = src_freq.size * upsample_factor ** 2
250+
normalization = src_freq.size * upsample_factor**2
251251
# Matrix multiply DFT around the current shift estimate
252252
sample_region_offset = dftshift - shifts * upsample_factor
253253
cross_correlation = _upsampled_dft(

fimpy/roi_extraction/corr_algorithms.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def _jit_flood(
273273

274274
i_roi = 0
275275

276-
max_r2 = max_radius ** 2
276+
max_r2 = max_radius**2
277277
voxel_size2 = _tuple3_square(voxel_size)
278278

279279
valid = corr_map.copy()

fimpy/utilities.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def fast_pearson(x, y):
4747
s_y += y[i]
4848
s_x2 += x[i] ** 2
4949
s_y2 += y[i] ** 2
50-
denominator = math.sqrt((s_x2 - (s_x ** 2) / n) * (s_y2 - (s_y ** 2) / n))
50+
denominator = math.sqrt((s_x2 - (s_x**2) / n) * (s_y2 - (s_y**2) / n))
5151
if denominator == 0:
5252
return 0
5353
return (s_xy - s_x * s_y / n) / denominator

tests/test_roi_extraction.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def test_positive_corr():
4242
]
4343
)
4444

45-
np.testing.assert_allclose(cm, expected_result, atol=2 / 2 ** 15)
45+
np.testing.assert_allclose(cm, expected_result, atol=2 / 2**15)
4646

4747

4848
def test_big_vals():
@@ -55,14 +55,14 @@ def test_big_vals():
5555
[[255, 255, 255], [0, 255, 255], [0, 0, 0]],
5656
]
5757
)
58-
* 2 ** 4
58+
* 2**4
5959
)
6060

6161
cm = correlation_map(video[:, None, :, :], window_size=(1, 3, 3))
6262

6363
result = np.array([[0, 0, 0], [0, 0.375, 0], [0, 0, 0]])[None, :, :]
6464

65-
assert np.all(np.isclose(cm, result, atol=2 / 2 ** 15))
65+
assert np.all(np.isclose(cm, result, atol=2 / 2**15))
6666

6767

6868
def test_simple_flood_case():

0 commit comments

Comments
 (0)