We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a3db4b7 commit 3927195Copy full SHA for 3927195
voxelwise_tutorials/viz.py
@@ -171,8 +171,11 @@ def map_voxels_to_flatmap(voxels, mapper_file):
171
172
# dimensions
173
width, height = flatmap_mask.shape
174
- n_voxels, n_channels = voxels.shape
175
- n_pixels_used, n_voxels = voxel_to_flatmap.shape
+ n_voxels_0, n_channels = voxels.shape
+ n_pixels_used, n_voxels_1 = voxel_to_flatmap.shape
176
+ if n_voxels_0 != n_voxels_1:
177
+ raise ValueError(f"Dimension mismatch, {n_voxels_0} voxels given "
178
+ f"while the mapper expects {n_voxels_1} voxels.")
179
180
# create image with nans, and array with used pixels
181
img = np.full(shape=(width, height, n_channels), fill_value=np.nan)
0 commit comments