Commit 6c10a210 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

MNT: Avoid deprecation warnings

parent ffa8fba3
......@@ -73,7 +73,10 @@ class AboutDialog(wx.Dialog):
mod = getattr(mod, n)
if lib == 'PIL':
swVer = str(mod.PILLOW_VERSION)
try:
swVer = str(mod.__version__)
except Exception:
swVer = str(mod.PILLOW_VERSION)
else:
swVer = str(mod.__version__)
except Exception:
......
......@@ -58,7 +58,7 @@ class ImportDataSeriesAction(base.Action):
# Assuming that the data series
# to plot are stored as columns
data = np.loadtxt(filePath, dtype=np.float).T
data = np.loadtxt(filePath, dtype=float).T
# Make sure the data is 2D, to
# make code below easier and
......@@ -116,8 +116,7 @@ class ImportDataSeriesAction(base.Action):
xdata = data[0, :]
ydata = data[1:, :]
else:
xdata = np.arange(0, data.shape[1] * xscale, xscale,
dtype=np.float)
xdata = np.arange(0, data.shape[1] * xscale, xscale, dtype=float)
ydata = data
for i, ydata in enumerate(ydata):
......
......@@ -943,7 +943,7 @@ def loadLookupTableFile(fname):
f,
usecols=(0, 1, 2, 3),
dtype={
'formats' : (np.int, np.float, np.float, np.float),
'formats' : (int, float, float, float),
'names' : ('label', 'r', 'g', 'b')})
# Save the label ordering -
......
......@@ -877,8 +877,8 @@ class PlotPanel(viewpanel.ViewPanel):
ds.overlay.name, len(xdata), len(ydata)))
return (0, 0), (0, 0)
xdata = np.asarray(xdata, dtype=np.float)
ydata = np.asarray(ydata, dtype=np.float)
xdata = np.asarray(xdata, dtype=float)
ydata = np.asarray(ydata, dtype=float)
log.debug('Drawing {} for {}'.format(type(ds).__name__, ds.overlay))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment