Skip to content

Commit 4c24f78

Browse files
authored
Merge pull request #23 from jagruti8/check-fix-dvars
Refined the code for dvars inside the findoutlie/metrics.py file
2 parents 5fc46fe + 2ea3a3a commit 4c24f78

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

findoutlie/metrics.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ def dvars(img):
3131
# But solve it any way you can.
3232
# This is a placeholder, replace it to write your solution.
3333
data = img.get_fdata()
34-
vol_shape = data.shape[:-1]
35-
n_voxels = np.prod(vol_shape)
36-
37-
voxel_by_time = np.reshape(data, (n_voxels, data.shape[-1]))
34+
35+
voxel_by_time = np.reshape(data, (-1, data.shape[-1]))
3836

3937
vol_diff = voxel_by_time[..., 1:] - voxel_by_time[..., :-1] # 2D array
4038
# print(vol_diff.shape())

0 commit comments

Comments
 (0)