Skip to content

Commit 31f990f

Browse files
committed
Use nearest integer for the block size evaluation
1 parent 6b953a0 commit 31f990f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ctapipe_io_nectarcam/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,7 @@ def guess_block_size_from_file(filename):
14071407
if len(ids) > 100:
14081408
break
14091409
ids = np.array(ids, dtype=int)
1410-
block_size = int(np.median(np.array(ids[1:] - ids[:-1])))
1410+
block_size = int(np.rint(np.median(np.array(ids[1:] - ids[:-1]))))
14111411
# print(f"{self.block_size = }")
14121412
except Exception:
14131413
print("Can't guess properly block size !")

0 commit comments

Comments
 (0)