Skip to content

Commit 29a40a0

Browse files
committed
Merge pull request #92 from johannesschabbauer/fix-h5py-memoryleak
Fix memory leak of h5py when accessing dataset with composite dtypes.
1 parent f27efc4 commit 29a40a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

labscript_utils/properties.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def _get_con_table_properties(h5_file, device_name):
124124

125125
# Compare with the name in the connection table
126126
# whether it is np.bytes_ or vlenstr:
127-
namecol_dtype = dataset['name'].dtype
127+
namecol_dtype = dataset.dtype['name']
128128
if namecol_dtype.type is np.bytes_:
129129
device_name = device_name.encode('utf8')
130130
elif namecol_dtype is h5py.special_dtype(vlen=str):
@@ -143,7 +143,7 @@ def _get_unit_conversion_parameters(h5_file, device_name):
143143

144144
# Compare with the name in the connection table
145145
# whether it is np.bytes_ or vlenstr:
146-
namecol_dtype = dataset['name'].dtype
146+
namecol_dtype = dataset.dtype['name']
147147
if namecol_dtype.type is np.bytes_:
148148
device_name = device_name.encode('utf8')
149149
elif namecol_dtype is h5py.special_dtype(vlen=str):

0 commit comments

Comments
 (0)