Skip to content
Snippets Groups Projects
Commit 1b8bf757 authored by auphelia's avatar auphelia
Browse files

[DataPacking] Delete check for np.str

parent 40dd14a8
No related branches found
No related tags found
No related merge requests found
...@@ -265,7 +265,7 @@ def numpy_to_hls_code( ...@@ -265,7 +265,7 @@ def numpy_to_hls_code(
# define a function to convert a single element into a C++ init string # define a function to convert a single element into a C++ init string
# a single element can be a hex string if we are using packing # a single element can be a hex string if we are using packing
def elem2str(x): def elem2str(x):
if type(x) == str or type(x) == np.str_ or type(x) == np.str: if type(x) == str or type(x) == np.str_:
return '%s("%s", 16)' % (hls_dtype, x) return '%s("%s", 16)' % (hls_dtype, x)
elif type(x) == np.float32: elif type(x) == np.float32:
if dtype.is_integer(): if dtype.is_integer():
......
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