Skip to content

Commit

Permalink
clarify the note on np.trunc usage
Browse files Browse the repository at this point in the history
  • Loading branch information
astafan8 committed Apr 20, 2021
1 parent e66b5cc commit 887e25d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion qcodes/instrument_drivers/tektronix/AWG5014.py
Original file line number Diff line number Diff line change
Expand Up @@ -1688,7 +1688,8 @@ def _pack_waveform(
raise TypeError('Marker 2 contains invalid values.' +
' Only 0 and 1 are allowed')

# Note: np.trunc is an order of magnitude faster then np.round
# Note: we use np.trunc here rather than np.round
# as it is an order of magnitude faster
packed_wf = np.trunc(16384 * m1 + 32768 * m2
+ wf * 8191 + 8191.5).astype(np.uint16)

Expand Down

0 comments on commit 887e25d

Please sign in to comment.