Skip to content

Commit

Permalink
Fix calculating proportions for MR
Browse files Browse the repository at this point in the history
  • Loading branch information
slobodan-ilic committed Jan 15, 2018
1 parent c4886f0 commit b996fa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cr/cube/crunch_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def _mr_proportions(self, axis, weighted):

# The following are normal MR x something (not CA)
if axis == 1:
res = table[:, 0, :] / np.sum(table[:, 0, :], 1)[:, np.newaxis]
return self.as_array() / self.margin(axis=1)[:, np.newaxis]
else:
res = table[:, 0, :] / (table[:, 0, :] + table[:, 1, :])
elif self.dimensions[1].type == 'multiple_response':
Expand Down

0 comments on commit b996fa9

Please sign in to comment.