Commit f4d90e73 authored by Benjamin Jakimow's avatar Benjamin Jakimow
Browse files
parent 5fc56894
Pipeline #17171 failed with stage
in 6 seconds
......@@ -430,7 +430,7 @@ class SpectralProfilePlotDataItem(PlotDataItem):
# 1. convert to numpy arrays
if not isinstance(y, np.ndarray):
y = np.asarray(y, dtype=np.float)
y = np.asarray(y, dtype=float)
if not isinstance(x, np.ndarray):
x = np.asarray(x)
......@@ -115,8 +115,8 @@ class SPECCHIOSpectralLibraryIO(AbstractSpectralLibraryIO):
# sort by wavelength
numericValueKeys = np.asarray(numericValueKeys, dtype=np.str)
xValues = np.asarray(numericValueKeys, dtype=np.float)
numericValueKeys = np.asarray(numericValueKeys, dtype=str)
xValues = np.asarray(numericValueKeys, dtype=float)
s = np.argsort(xValues)
numericValueKeys = numericValueKeys[s]
xValues = xValues[s]
......@@ -572,7 +572,7 @@ def createQgsField(name: str, exampleValue: typing.Any, comment: str = None) ->
return QgsField(name, QVariant.Int, 'int', comment=comment)
elif isinstance(exampleValue, (np.uint, np.uint8, np.uint16, np.uint32, np.uint64)):
return QgsField(name, QVariant.UInt, 'uint', comment=comment)
elif isinstance(exampleValue, (float, np.double, np.float, np.double, np.float16, np.float32, np.float64)):
elif isinstance(exampleValue, (float, np.double, np.float16, np.float32, np.float64)):
return QgsField(name, QVariant.Double, 'double', comment=comment)
elif isinstance(exampleValue, np.ndarray):
return QgsField(name, QVariant.String, 'varchar', comment=comment)
Markdown is supported
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