From 5c3cae730f68b0c32a9f0bb588b1573e32f77236 Mon Sep 17 00:00:00 2001 From: "J.A. de Jong - Redu-Sone B.V., ASCEE V.O.F" Date: Thu, 28 Jan 2021 22:16:09 +0100 Subject: [PATCH] Bugfix for something that does not seem to work anymore with Numpy. np.int16.itemsize is not a number anymore. --- CMakeLists.txt | 2 +- lasp/device/lasp_daq.pyx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a562df0..bae4aa7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,7 +67,7 @@ endif(LASP_FLOAT STREQUAL "double") # ##################### END Cmake variables converted to a macro -set(Python_ADDITIONAL_VERSIONS "3.8") +set(Python_ADDITIONAL_VERSIONS "3.8 3.9") # #################### Setting definitions and debug-specific compilation flags # General make flags diff --git a/lasp/device/lasp_daq.pyx b/lasp/device/lasp_daq.pyx index c486ba6..b974a1a 100644 --- a/lasp/device/lasp_daq.pyx +++ b/lasp/device/lasp_daq.pyx @@ -24,15 +24,15 @@ cdef cnp.NPY_TYPES getCNumpyDataType(DataType& dt): cdef getNumpyDataType(DataType& dt): if(dt == dtype_fl32): - return np.float32 + return np.dtype(np.float32) elif(dt == dtype_fl64): - return np.float64 + return np.dtype(np.float64) elif(dt == dtype_int8): - return np.int8 + return np.dtype(np.int8) elif(dt == dtype_int16): - return np.int16 + return np.dtype(np.int16) elif(dt == dtype_int32): - return np.int32 + return np.dtype(np.int32) else: raise ValueError('Unknown data type')