Skip to content

Commit

Permalink
Apply ruff/Perflint rule PERF401
Browse files Browse the repository at this point in the history
PERF401 Use a list comprehension to create a transformed list
  • Loading branch information
DimitriPapadopoulos committed Nov 23, 2024
1 parent cdbf03b commit fe1c3f1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nireports/reportlets/xca.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ def plot_melodic_components(
else:
mask_img = nb.load(report_mask)

mask_sl = []
for j in range(3):
mask_sl.append(transform_to_2d(mask_img.get_fdata(), j))
mask_sl = [transform_to_2d(mask_img.get_fdata(), j) for j in range(3)]

timeseries = np.loadtxt(os.path.join(melodic_dir, "melodic_mix"))
power = np.loadtxt(os.path.join(melodic_dir, "melodic_FTmix"))
Expand Down

0 comments on commit fe1c3f1

Please sign in to comment.