Skip to content

Commit 8a545c1

Browse files
Merge pull request #61 from chrisjbillington/remove-dtype-workaround
Remove use of numpy_dtype_workaround
2 parents eb7160a + d13f569 commit 8a545c1

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

labscript/labscript.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
from __future__ import division, unicode_literals, print_function, absolute_import
1515
from labscript_utils import PY2
16-
from labscript_utils.numpy_dtype_workaround import dtype_workaround
1716
if PY2:
1817
str = unicode
1918
import __builtin__ as builtins
@@ -1787,7 +1786,7 @@ def close(self, t):
17871786

17881787
def generate_code(self, hdf5_file):
17891788
classname = self.__class__.__name__
1790-
calibration_table_dtypes = dtype_workaround([('name','a256'), ('open_delay',float), ('close_delay',float)])
1789+
calibration_table_dtypes = [('name','a256'), ('open_delay',float), ('close_delay',float)]
17911790
if classname not in hdf5_file['calibrations']:
17921791
hdf5_file['calibrations'].create_dataset(classname, (0,), dtype=calibration_table_dtypes, maxshape=(None,))
17931792
metadata = (self.name,self.open_delay,self.close_delay)
@@ -2124,7 +2123,7 @@ class LabscriptError(Exception):
21242123

21252124
def save_time_markers(hdf5_file):
21262125
time_markers = compiler.time_markers
2127-
dtypes = dtype_workaround([('label','a256'), ('time', float), ('color', '(1,3)int')])
2126+
dtypes = [('label','a256'), ('time', float), ('color', '(1,3)int')]
21282127
data_array = zeros(len(time_markers), dtype=dtypes)
21292128
for i, t in enumerate(time_markers):
21302129
data_array[i] = time_markers[t]["label"], t, time_markers[t]["color"]
@@ -2170,10 +2169,10 @@ def generate_connection_table(hdf5_file):
21702169

21712170
connection_table.sort()
21722171
vlenstring = h5py.special_dtype(vlen=str)
2173-
connection_table_dtypes = dtype_workaround([('name','a256'), ('class','a256'), ('parent','a256'), ('parent port','a256'),
2172+
connection_table_dtypes = [('name','a256'), ('class','a256'), ('parent','a256'), ('parent port','a256'),
21742173
('unit conversion class','a256'), ('unit conversion params', vlenstring),
21752174
('BLACS_connection','a'+str(max_BLACS_conn_length)),
2176-
('properties', vlenstring)])
2175+
('properties', vlenstring)]
21772176
connection_table_array = empty(len(connection_table),dtype=connection_table_dtypes)
21782177
for i, row in enumerate(connection_table):
21792178
connection_table_array[i] = row
@@ -2257,7 +2256,7 @@ def write_device_properties(hdf5_file):
22572256

22582257

22592258
def generate_wait_table(hdf5_file):
2260-
dtypes = dtype_workaround([('label','a256'), ('time', float), ('timeout', float)])
2259+
dtypes = [('label','a256'), ('time', float), ('timeout', float)]
22612260
data_array = zeros(len(compiler.wait_table), dtype=dtypes)
22622261
for i, t in enumerate(sorted(compiler.wait_table)):
22632262
label, timeout = compiler.wait_table[t]

0 commit comments

Comments
 (0)