Skip to content

Commit 72a22f9

Browse files
authored
Merge pull request #2 from BerkeleyLab/numpy_update
Numpy compatibility updates to raw.py
2 parents 0d940c2 + 05d7c4f commit 72a22f9

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎leep/raw.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ def wait_for_acq(self, tag=False, toggle_tag=False, timeout=5.0,
309309

310310
if self.rfs:
311311
T, = self.reg_read(['dsp_tag'], instance=instance)
312+
T = int(T)
312313
if tag or toggle_tag:
313314
T = (T + 1) & 0xff
314315
self.reg_write([('dsp_tag', T)], instance=instance)
@@ -350,8 +351,8 @@ def wait_for_acq(self, tag=False, toggle_tag=False, timeout=5.0,
350351

351352
if self.rfs:
352353
slow, = self.reg_read(['slow_data'], instance=instance)
353-
tag_old = slow[34]
354-
tag_new = slow[33]
354+
tag_old = int(slow[34])
355+
tag_new = int(slow[33])
355356
dT = (tag_old - T) & 0xff
356357
tag_match = dT == 0 and tag_new == tag_old
357358

‎leep/test/test_cli.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,12 @@ def test_parseTransaction():
293293
for _input in bads:
294294
try:
295295
result = parseTransaction(_input)
296-
print(f"Expected an exception for input: { _input } but got {result}")
296+
print(f"Expected an exception for input: {_input} but got {result}")
297297
errors += 1
298298
except ValueError:
299299
pass
300300
except Exception as ex:
301-
print(f"Unexpected exception for input: { _input }: { ex }")
301+
print(f"Unexpected exception for input: {_input}: {ex}")
302302
errors += 1
303303
return errors
304304

0 commit comments

Comments
 (0)