File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ def Action(name, **fields):
121121 'l' : 'LONG' , # int_
122122 'f' : 'FLOAT' , # single
123123 'd' : 'DOUBLE' , # float_
124- # 'S': 'STRING', # str_
124+ # noqa 'S': 'STRING', # str_
125125
126126 # The following type codes are weakly supported by pretending that
127127 # they're related types.
@@ -138,7 +138,7 @@ def Action(name, **fields):
138138
139139# Coverts FTVL string to numpy type
140140DbfStringToNumpy = {
141- # 'STRING': numpy.dtype('S40'), # Don't think we want this!
141+ # noqa 'STRING': numpy.dtype('S40'), # Don't think we want this!
142142 'CHAR' : numpy .dtype ('int8' ),
143143 'UCHAR' : numpy .dtype ('uint8' ),
144144 'SHORT' : numpy .dtype ('int16' ),
Original file line number Diff line number Diff line change @@ -315,6 +315,9 @@ class ao(ProcessDeviceSupportOut):
315315
316316
317317def _require_waveform (value , dtype ):
318+ if isinstance (value , bytes ):
319+ # Special case hack for byte arrays. Surprisingly tricky:
320+ value = numpy .frombuffer (value , dtype = numpy .uint8 )
318321 value = numpy .require (value , dtype = dtype )
319322 if value .shape == ():
320323 value .shape = (1 ,)
You can’t perform that action at this time.
0 commit comments