From b15b89f1c884927922fa127c5baa4a67e9fac8d3 Mon Sep 17 00:00:00 2001 From: Sergey Yaroslavtsev Date: Tue, 3 Mar 2026 21:46:32 +0100 Subject: [PATCH] fix numpy float to float64 --- src/PyMca5/PyMcaGui/pymca/PyMcaImageWindow.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/PyMca5/PyMcaGui/pymca/PyMcaImageWindow.py b/src/PyMca5/PyMcaGui/pymca/PyMcaImageWindow.py index f3d45df16..3ad485758 100644 --- a/src/PyMca5/PyMcaGui/pymca/PyMcaImageWindow.py +++ b/src/PyMca5/PyMcaGui/pymca/PyMcaImageWindow.py @@ -235,9 +235,9 @@ def _addSelection(self, selectionlist): self._imageData = self._imageData / tmpView.astype(numpy.float64) else: #let numpy raise the appropriate error - self._imageData = self._imageData / numpy.float(m) + self._imageData = self._imageData / numpy.float64(m) else: - self._imageData = self._imageData / numpy.float(m) + self._imageData = self._imageData / numpy.float64(m) self.slider.hide() self.setName(legend) else: @@ -275,7 +275,7 @@ def _getImageDataFromSingleIndex(self, index): if dataObject.m is not None: #is a list for m in dataObject.m: - data = data / numpy.float(m) + data = data / numpy.float64(m) return data if len(shape) == 3: data = dataObject.data[index:index+1,:,:] @@ -289,9 +289,9 @@ def _getImageDataFromSingleIndex(self, index): tmpView = tmpView.reshape(*data.shape) data = data / tmpView.astype(numpy.float64) else: - data = data / numpy.float(m) + data = data / numpy.float64(m) else: - data = data / numpy.float(m) + data = data / numpy.float64(m) return data #I have to deduce the appropriate indices from the given index @@ -310,9 +310,9 @@ def _getImageDataFromSingleIndex(self, index): tmpView = tmpView.reshape(*data.shape) data = data / tmpView.astype(numpy.float64) else: - data = data / numpy.float(m) + data = data / numpy.float64(m) else: - data = data / numpy.float(m) + data = data / numpy.float64(m) return data raise IndexError("Unhandled dimension")