Skip to content

Commit 4dcddcb

Browse files
committed
Python3_PhaseMatrixQuickSyn: Made use of new dtype workaround
1 parent 40c0def commit 4dcddcb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

PhaseMatrixQuickSyn.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import numpy as np
1919
from labscript_devices import labscript_device, BLACS_tab, BLACS_worker, runviewer_parser
20+
from labscript_utils.numpy_dtype_workaround import dtype_workaround
2021

2122
from labscript import Device, StaticDDS, StaticAnalogQuantity, StaticDigitalOut, config, LabscriptError, set_passed_properties
2223
import labscript_utils.properties
@@ -94,8 +95,9 @@ def generate_code(self, hdf5_file):
9495
dds.gate.expand_timeseries()
9596

9697
dds.frequency.raw_output, dds.frequency.scale_factor = self.quantise_freq(dds.frequency.raw_output, dds)
97-
static_dtypes = {'names': ['freq0', 'gate0'], 'formats': [np.uint64, np.uint16, ]}
98-
static_table = np.zeros(1, dtype=static_dtypes)
98+
static_dtypes = dtype_workaround([('freq0', np.uint64)] + \
99+
- [('gate0', np.uint16)])
100+
static_table = np.zeros(1, dtype=static_dtypes)
99101
static_table['freq0'].fill(1)
100102
static_table['freq0'] = dds.frequency.raw_output[0]
101103
static_table['gate0'] = dds.gate.raw_output[0]

0 commit comments

Comments
 (0)