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

fixes for nump2 and newer windows gfortran #412

Merged
merged 2 commits into from
Jan 3, 2025
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 pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "rosco"
version = "2.9.5"
version = "2.9.6"
description = "A reference open source controller toolset for wind turbine applications."
readme = "README.md"
requires-python = ">=3.9"
Expand Down
2 changes: 2 additions & 0 deletions rosco/toolbox/control_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
create_string_buffer,
c_int32,
c_void_p,
wintypes,
)
import numpy as np
import platform
Expand Down Expand Up @@ -258,6 +259,7 @@ def null_free_dll(*spam): # pragma: no cover

if OS == "Windows": # pragma: Windows
try:
ctypes.windll.kernel32.FreeLibrary.argtypes = [wintypes.HMODULE]
_dlclose = ctypes.windll.kernel32.FreeLibrary
dlclose = lambda handle: 0 if _dlclose(handle) else 1
except:
Expand Down
2 changes: 1 addition & 1 deletion rosco/toolbox/ofTools/fast_io/output_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def load_ascii_output(filename):
info['attribute_units'] = [unit[1:-1] for unit in f.readline().split()]

# Data, up to end of file or empty line (potential comment line at the end)
data = np.array([l.strip().split() for l in takewhile(lambda x: len(x.strip())>0, f.readlines())]).astype(np.float_)
data = np.array([l.strip().split() for l in takewhile(lambda x: len(x.strip())>0, f.readlines())]).astype(np.float64)
return data, info


Expand Down
2 changes: 1 addition & 1 deletion rosco/toolbox/ofTools/util/FileTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def loop_dict(vartree, branch):

if data_type in [np.int_, np.intc, np.intp, np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64]:
get_dict(fst_vt, branch_i[:-1])[branch_i[-1]] = int(get_dict(fst_vt, branch_i[:-1])[branch_i[-1]])
elif data_type in [np.single, np.double, np.longdouble, np.csingle, np.cdouble, np.float_, np.float16, np.float32, np.float64, np.complex64, np.complex128]:
elif data_type in [np.single, np.double, np.longdouble, np.csingle, np.cdouble, np.float16, np.float32, np.float64, np.complex64, np.complex128]:
get_dict(fst_vt, branch_i[:-1])[branch_i[-1]] = float(get_dict(fst_vt, branch_i[:-1])[branch_i[-1]])
elif data_type in [np.bool_]:
get_dict(fst_vt, branch_i[:-1])[branch_i[-1]] = bool(get_dict(fst_vt, branch_i[:-1])[branch_i[-1]])
Expand Down
Loading