Skip to content

Commit

Permalink
Fix index table base calculation for MR x MR
Browse files Browse the repository at this point in the history
  • Loading branch information
slobodan-ilic committed Oct 17, 2018
1 parent d8f86d6 commit 5f73986
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cr/cube/cube_slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,10 @@ def _prepare_index_base(self, axis):
base = base / np.sum(base, axis=1)[:, None]
return base[:, 0]
elif isinstance(self.mr_dim_ind, tuple) and axis in self.mr_dim_ind:
total = np.sum(base, axis=(axis + 1))[0]
total = np.sum(base, axis=(axis + 1))
if axis == 0:
return base[:, 0] / total[0]
return base[0, :, 0] / total
return base[:, 0, 0] / total[:, 0]
return base[0, :, 0] / total[0]

if axis == 0 and self.mr_dim_ind is not None:
base = base[:, 0]
Expand Down

0 comments on commit 5f73986

Please sign in to comment.