diff options
author | sara <sara.halter@gmx.ch> | 2021-12-04 15:19:24 +0100 |
---|---|---|
committer | sara <sara.halter@gmx.ch> | 2021-12-04 15:19:24 +0100 |
commit | eca32bbd53d4fc51095700621525ac479f06c06c (patch) | |
tree | fa35558e23c29256b30e15515d77b4f305343de3 /src/gr-fadingui/python | |
parent | Fix correlation peak detector and add frame_start tags (diff) | |
download | Fading-eca32bbd53d4fc51095700621525ac479f06c06c.tar.gz Fading-eca32bbd53d4fc51095700621525ac479f06c06c.zip |
Fix network sink block (again)
Diffstat (limited to '')
-rw-r--r-- | src/gr-fadingui/python/netsink.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gr-fadingui/python/netsink.py b/src/gr-fadingui/python/netsink.py index d2dfc92..130e5dc 100644 --- a/src/gr-fadingui/python/netsink.py +++ b/src/gr-fadingui/python/netsink.py @@ -15,7 +15,17 @@ class netsink(gr.sync_block): Keep in mind that is quite slow. """ def __init__(self, address, dtype, vlen): - dt = np.dtype(dtype, (vlen,)) if vlen > 1 else dtype + to_numpy = { + "complex": np.complex64, + "float": np.float32, + "int": np.int32, + "short": np.short, + "byte": np.byte, + } + + dt = to_numpy[dtype] + if vlen > 1: + dt = np.dtype(dt, (vlen,)) print(dt) gr.sync_block.__init__(self, |