Commit b18061d2683cacecbc18ce8a61773b47a05cee3d
1 parent
3368fa08
Exists in
master
and in
3 other branches
Dealing with integer overflow when calculating the histogram
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
invesalius/data/slice_.py
... | ... | @@ -116,7 +116,7 @@ class Slice(object): |
116 | 116 | def matrix(self, value): |
117 | 117 | self._matrix = value |
118 | 118 | i, e = value.min(), value.max() |
119 | - r = e - i | |
119 | + r = int(e) - int(i) | |
120 | 120 | self.histogram = numpy.histogram(self._matrix, r, (i, e))[0] |
121 | 121 | |
122 | 122 | def __bind_events(self): | ... | ... |