From b5a84b805987914b8de80e69ace981881d58eb4f Mon Sep 17 00:00:00 2001 From: jim Date: Sun, 26 Apr 2015 18:16:11 -0500 Subject: [PATCH] resolves #5: removed two unnecessary array typecasting operations --- nd2reader/model/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nd2reader/model/__init__.py b/nd2reader/model/__init__.py index 9c15ac2..1ae84e4 100644 --- a/nd2reader/model/__init__.py +++ b/nd2reader/model/__init__.py @@ -86,8 +86,8 @@ class Image(object): @property def data(self): if self._data is None: - # The data is just a flat, 1-dimensional array. We convert it to a 2D array and cast the data points as 16-bit integers - self._data = np.reshape(self._raw_data, (self._height, self._width)).astype(np.int64).astype(np.uint16) + # The data is just a flat, 1-dimensional array. We convert it to a 2D image here. + self._data = np.reshape(self._raw_data, (self._height, self._width)) return self._data @property