mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-12-02 02:57:47 +01:00
typed as np.int32 (#1446)
This commit is contained in:
1 parent
f3d5b666a8
commit
df5d8f00d8
1 file changed
+4
-4
@@ -96,7 +96,7 @@ class NamedDacs:
|
||||
"""
|
||||
Read the dacs into a numpy array with dimensions [ndacs, nmodules]
|
||||
"""
|
||||
dac_array = np.zeros((len(self._dacnames), len(self._detector)))
|
||||
dac_array = np.zeros((len(self._dacnames), len(self._detector)), dtype = np.int32)
|
||||
for i, _d in enumerate(self):
|
||||
dac_array[i,:] = _d[:]
|
||||
return dac_array
|
||||
@@ -108,7 +108,7 @@ class NamedDacs:
|
||||
"""
|
||||
Set the dacs from an numpy array with dac values. [ndacs, nmodules]
|
||||
"""
|
||||
dac_array = dac_array.astype(np.int)
|
||||
dac_array = dac_array.astype(np.int32)
|
||||
for i, _d in enumerate(self):
|
||||
_d[:] = dac_array[i]
|
||||
|
||||
@@ -170,7 +170,7 @@ class DetectorDacs:
|
||||
"""
|
||||
Read the dacs into a numpy array with dimensions [ndacs, nmodules]
|
||||
"""
|
||||
dac_array = np.zeros((len(self._dacs), len(self._detector)))
|
||||
dac_array = np.zeros((len(self._dacs), len(self._detector)), dtype = np.int32)
|
||||
for i, _d in enumerate(self):
|
||||
dac_array[i,:] = _d[:]
|
||||
return dac_array
|
||||
@@ -182,7 +182,7 @@ class DetectorDacs:
|
||||
"""
|
||||
Set the dacs from an numpy array with dac values. [ndacs, nmodules]
|
||||
"""
|
||||
dac_array = dac_array.astype(np.int)
|
||||
dac_array = dac_array.astype(np.int32)
|
||||
for i, _d in enumerate(self):
|
||||
_d[:] = dac_array[i]
|
||||
|
||||
|
||||
Reference in new issue
Block a user