From 5d0974673884e24b920847d7a4dd35e57d0e3337 Mon Sep 17 00:00:00 2001 From: miranis <33010847+miranis@users.noreply.github.com> Date: Mon, 23 Oct 2017 01:45:52 +0200 Subject: [PATCH] Update ImageItem.py Functions nanmin and nanmax are defined in the numpy module and cannot be accessed from the global namespace! --- pyqtgraph/graphicsItems/ImageItem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyqtgraph/graphicsItems/ImageItem.py b/pyqtgraph/graphicsItems/ImageItem.py index 9588c586..04a5c757 100644 --- a/pyqtgraph/graphicsItems/ImageItem.py +++ b/pyqtgraph/graphicsItems/ImageItem.py @@ -329,7 +329,7 @@ class ImageItem(GraphicsObject): sl = [slice(None)] * data.ndim sl[ax] = slice(None, None, 2) data = data[sl] - return nanmin(data), nanmax(data) + return np.nanmin(data), np.nanmax(data) def updateImage(self, *args, **kargs): ## used for re-rendering qimage from self.image.