Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DLL (again) #46

Merged
merged 3 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cadet/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "CADET-Python"

__version__ = "1.0.3"
__version__ = "1.0.4"

from .h5 import H5
from .cadet import Cadet
4 changes: 2 additions & 2 deletions cadet/cadet_dll_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def param_provider_get_string_array_item(
bytes_val = o
elif isinstance(o, str):
bytes_val = o.encode('utf-8')
elif isinstance(o, np.ndarray):
elif isinstance(o, (np.ndarray, list)):
bytes_val = o[index]
else:
raise TypeError(
Expand All @@ -472,7 +472,7 @@ def param_provider_get_string_array_item(
reader.buffer = bytes_val
val[0] = ctypes.cast(reader.buffer, ctypes.c_char_p)

log_print(f"GET array [string] ({index}) {n}: {reader.buffer.decode('utf-8')}")
log_print(f"GET array [string] ({index}) {n}: {bytes_val}")
return 0


Expand Down
Loading