From 4ac8e39aea3c41afaeb30faa8086ab1716450080 Mon Sep 17 00:00:00 2001 From: Ogi Moore Date: Sun, 14 Feb 2021 12:05:22 -0800 Subject: [PATCH 1/2] Remove duplicate import and remove whitespace --- pyqtgraph/__init__.py | 2 +- pyqtgraph/graphicsItems/PlotDataItem.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pyqtgraph/__init__.py b/pyqtgraph/__init__.py index 1468bbdd..49b918d9 100644 --- a/pyqtgraph/__init__.py +++ b/pyqtgraph/__init__.py @@ -395,7 +395,7 @@ def plot(*args, **kargs): Accepts a *title* argument to set the title of the window. All other arguments are used to plot data. (see :func:`PlotItem.plot() `) """ - mkQApp() + mkQApp() pwArgList = ['title', 'labels', 'name', 'left', 'right', 'top', 'bottom', 'background'] pwArgs = {} dataArgs = {} diff --git a/pyqtgraph/graphicsItems/PlotDataItem.py b/pyqtgraph/graphicsItems/PlotDataItem.py index f4654f79..9e9431ff 100644 --- a/pyqtgraph/graphicsItems/PlotDataItem.py +++ b/pyqtgraph/graphicsItems/PlotDataItem.py @@ -9,7 +9,6 @@ from .ScatterPlotItem import ScatterPlotItem from .. import functions as fn from .. import debug as debug from .. import getConfigOption -import warnings class PlotDataItem(GraphicsObject): From 825286066acb159e08d7ae55dd885ae1b6c2120d Mon Sep 17 00:00:00 2001 From: Ogi Moore Date: Sun, 14 Feb 2021 14:55:50 -0800 Subject: [PATCH 2/2] only cast to float32 when safe to do so --- pyqtgraph/functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyqtgraph/functions.py b/pyqtgraph/functions.py index 7276f677..836d96cf 100644 --- a/pyqtgraph/functions.py +++ b/pyqtgraph/functions.py @@ -1129,7 +1129,7 @@ def makeARGB(data, lut=None, levels=None, scale=None, useRGBA=False, output=None raise Exception('levels argument is required for float input types') if not isinstance(levels, xp.ndarray): levels = xp.array(levels) - levels = levels.astype(xp.float32) + levels = levels.astype(xp.float64) if levels.ndim == 1: if levels.shape[0] != 2: raise Exception('levels argument must have length 2')