Skip to content

Commit

Permalink
FIX: Pass list to sparase_hstack, rather than generator
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Sep 24, 2023
1 parent a278c90 commit d17bd89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdcflows/interfaces/bspline.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def _run_interface(self, runtime):

# Calculate collocation matrix from (possibly resized) image and knot grids
colmat = sparse_hstack(
grid_bspline_weights(fmapnii, grid) for grid in bs_grids
[grid_bspline_weights(fmapnii, grid) for grid in bs_grids]
).tocsr()

bs_grids_str = ["x".join(str(s) for s in grid.shape) for grid in bs_grids]
Expand Down Expand Up @@ -255,7 +255,7 @@ def _run_interface(self, runtime):
else:
mask = np.ones_like(fmapnii.dataobj, dtype=bool)
colmat = sparse_hstack(
grid_bspline_weights(fmapnii, grid) for grid in bs_grids
[grid_bspline_weights(fmapnii, grid) for grid in bs_grids]
).tocsr()

regressors = colmat[mask.reshape(-1), :]
Expand Down

0 comments on commit d17bd89

Please sign in to comment.