Bugfix for something that does not seem to work anymore with Numpy. np.int16.itemsize is not a number anymore.
This commit is contained in:
parent
476d989898
commit
5c3cae730f
@ -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
|
||||
|
@ -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')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user