Skip to content

Commit 789c1b9

Browse files
author
Dilmi Wickramanayake
committed
fix mypy errors
1 parent 2e25548 commit 789c1b9

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

examples/niscope/niscope_binary_acquisition/niscope_binary_acquisition.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,15 @@
4747

4848
with session.initiate():
4949
data_size = panel.get_value("data_size", 8)
50+
wfm: np.ndarray[Any, Any]
51+
5052
if data_size == 8:
51-
wfm: np.ndarray[Any, np.dtype[np.int8]] = np.ndarray( # type: ignore
52-
1000 * 1000, dtype=np.int8
53-
)
53+
wfm = np.ndarray(1000 * 1000, dtype=np.int8)
54+
5455
elif data_size == 16:
55-
wfm: np.ndarray[Any, np.dtype[np.int16]] = np.ndarray( # type: ignore
56-
1000 * 1000, dtype=np.int16
57-
)
56+
wfm = np.ndarray(1000 * 1000, dtype=np.int16)
5857
else:
59-
wfm: np.ndarray[Any, np.dtype[np.int32]] = np.ndarray(
60-
1000 * 1000, dtype=np.int32
61-
)
58+
wfm = np.ndarray(1000 * 1000, dtype=np.int32)
6259

6360
waveforms = session.channels[panel.get_value("channel", 0)].fetch_into(
6461
relative_to=niscope.FetchRelativeTo.READ_POINTER,

0 commit comments

Comments
 (0)