Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 0d6dbd2a authored by MOEBEL Emmanuel's avatar MOEBEL Emmanuel
Browse files

utils.scoremaps.bin : corrected bug which made binning crash when scoremap had...

utils.scoremaps.bin : corrected bug which made binning crash when scoremap had an odd size (eg 151,200,200). Replaces np.round by np.ceil
parent ba4ad94d
No related branches found
No related tags found
No related merge requests found
...@@ -23,9 +23,9 @@ def bin(scoremaps): ...@@ -23,9 +23,9 @@ def bin(scoremaps):
""" """
dim = scoremaps.shape dim = scoremaps.shape
Ncl = dim[3] Ncl = dim[3]
dimB0 = np.int(np.round(dim[0]/2)) dimB0 = np.int(np.ceil(dim[0] / 2))
dimB1 = np.int(np.round(dim[1]/2)) dimB1 = np.int(np.ceil(dim[1] / 2))
dimB2 = np.int(np.round(dim[2]/2)) dimB2 = np.int(np.ceil(dim[2] / 2))
dimB = (dimB0, dimB1, dimB2, Ncl) dimB = (dimB0, dimB1, dimB2, Ncl)
scoremapsB = np.zeros(dimB) scoremapsB = np.zeros(dimB)
for cl in range(0,Ncl): for cl in range(0,Ncl):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment