Skip to content

Commit 18b6e44

Browse files
[autofix.ci] apply automated fixes
1 parent 0825b8b commit 18b6e44

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

mne/_fiff/_mmap_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# Authors: The MNE-Python contributors.
1010
# License: BSD-3-Clause
11-
# Copyright the MNE-Python contributors
11+
# Copyright the MNE-Python contributors.
1212

1313
import os
1414

mne/_fiff/utils.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ def _mult_cal_one(data_view, one, idx, cals, mult):
8888
# without materializing an intermediate float64 copy of `one`
8989
# (`one[idx]` is a view for basic slices). Numerically identical
9090
# to cast-then-scale because both are elementwise.
91-
np.multiply(one[idx], cals.reshape(-1, 1), out=data_view,
92-
casting="unsafe")
91+
np.multiply(one[idx], cals.reshape(-1, 1), out=data_view, casting="unsafe")
9392
else:
9493
one = np.asarray(one, dtype=data_view.dtype)
9594
# faster than doing one = one[idx]
@@ -241,7 +240,8 @@ def _read_segments_file(
241240
if mm is not None and ex.get("_mm_pid") != _os.getpid():
242241
mm = None
243242
if mm is not None and (
244-
mm.dtype != np.dtype(dtype) or mm.size * n_bytes < data_offset + data_left * n_bytes
243+
mm.dtype != np.dtype(dtype)
244+
or mm.size * n_bytes < data_offset + data_left * n_bytes
245245
):
246246
mm = None
247247
if mm is None and isinstance(ex, dict):
@@ -257,8 +257,9 @@ def _read_segments_file(
257257
for sample_start in np.arange(0, data_left, block_size) // n_channels:
258258
count = min(block_size, data_left - sample_start * n_channels)
259259
block = mm[
260-
base_idx + sample_start * n_channels :
261-
base_idx + sample_start * n_channels + count
260+
base_idx + sample_start * n_channels : base_idx
261+
+ sample_start * n_channels
262+
+ count
262263
]
263264
if block.size != count:
264265
raise RuntimeError(

0 commit comments

Comments
 (0)