Skip to content

Commit

Permalink
Add cast to fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Marton Gunyho committed May 24, 2022
1 parent af2a914 commit 650af77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qcodes_contrib_drivers/drivers/Tektronix/AFG3000.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Tuple, Sequence
from typing import Any, Tuple, Sequence, cast

import numpy as np
from qcodes import VisaInstrument
Expand Down Expand Up @@ -679,7 +679,7 @@ def upload_waveform(self, waveform: Sequence[float], memory: int):
# write data to the editable memory
self.visa_handle.write_binary_values(
f"DATA:DATA EMEM,",
wf_codes,
cast(Sequence[float], wf_codes), # cast to make types correct
datatype="H", # unsigned short (16 bits)
is_big_endian=True, # the AFG expects data in big endian order
header_fmt="ieee",
Expand Down

0 comments on commit 650af77

Please sign in to comment.