Skip to content

Commit 7b96cc4

Browse files
author
Chenying Zhao
committed
add changing into int type
1 parent b696deb commit 7b96cc4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"python.analysis.extraPaths": [
33
"./confixel"
4-
]
4+
],
5+
"python.linting.lintOnSave": false,
6+
"python.linting.enabled": false
57
}

confixel/fixels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def gather_fixels(index_file, directions_file):
8282
"""
8383

8484
index_img, index_data = mif_to_nifti2(index_file)
85-
count_vol = index_data[..., 0] # number of fixels in each voxel; by index.mif definition
85+
count_vol = index_data[..., 0].astype(np.uint32) # number of fixels in each voxel; by index.mif definition
8686
id_vol = index_data[..., 1] # index of the first fixel in this voxel, in the list of all fixels (in directions.mif, FD.mif, etc)
8787
max_id = id_vol.max()
8888
max_fixel_id = max_id + int(count_vol[id_vol == max_id]) # = the maximum id of fixels + 1 = # of fixels in entire image

0 commit comments

Comments
 (0)