Skip to content
Snippets Groups Projects
Unverified Commit 35e76f83 authored by auphelia's avatar auphelia Committed by GitHub
Browse files

Merge pull request #782 from Xilinx/fix/data_packing

[Hotfix] Interpretation of dtype to check for signed integer
parents 19f69e4f 4907f627
No related branches found
No related tags found
No related merge requests found
......@@ -220,7 +220,7 @@ def unpack_innermost_dim_from_hex_string(
if conv_dtype == DataType["BIPOLAR"]:
ar_list = [2 * x - 1 for x in ar_list]
# interpret values as signed values
elif dtype.signed():
elif conv_dtype.signed() and conv_dtype.is_integer():
mask = 2 ** (conv_dtype.bitwidth() - 1)
ar_list = [-(x & mask) + (x & ~mask) for x in ar_list]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment