From b18061d2683cacecbc18ce8a61773b47a05cee3d Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Wed, 18 Sep 2013 16:08:19 -0300 Subject: [PATCH] Dealing with integer overflow when calculating the histogram --- invesalius/data/slice_.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invesalius/data/slice_.py b/invesalius/data/slice_.py index c7a7412..34b984b 100644 --- a/invesalius/data/slice_.py +++ b/invesalius/data/slice_.py @@ -116,7 +116,7 @@ class Slice(object): def matrix(self, value): self._matrix = value i, e = value.min(), value.max() - r = e - i + r = int(e) - int(i) self.histogram = numpy.histogram(self._matrix, r, (i, e))[0] def __bind_events(self): -- libgit2 0.21.2