Skip to content

Commit 0b77402

Browse files
committed
fix overfull knossos cubes
1 parent 1f6521d commit 0b77402

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

wkcuber/knossos.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ def read_cube(self, cube_xyz):
3737
cube_data = np.fromfile(cube_file, dtype=self.dtype)
3838
if cube_data.size != CUBE_SIZE:
3939
padded_data = np.zeros(CUBE_SIZE, dtype=self.dtype)
40-
padded_data[0 : min(cube_data.size, CUBE_SIZE)] = cube_data
40+
padded_data[0 : min(cube_data.size, CUBE_SIZE)] = cube_data[
41+
0 : min(cube_data.size, CUBE_SIZE)
42+
]
4143
cube_data = padded_data
4244
cube_data = cube_data.reshape(CUBE_SHAPE, order="F")
4345
return cube_data

0 commit comments

Comments
 (0)