You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
WecOptTool tries to index a string into the excitation coeff when running optimization with a wec created with the from_impedance method, which produces an index error when exc_coeff is a numpy array.
To Reproduce
Steps to reproduce the behavior:
Minimum working example of an optimization where impedance and excitation are defined with numpy arrays.
I looked at old issues and it seems like this is a duplicate of #183, and the docstrings have been updated with #248 on main but not on v2.6.0 docs which is what I was looking at on the website.
Commenting to confirm that this error is solved with PR #248. The docs will be automatically updated when a new version is released. I am leaving this open for now to facilitate discussion on making sure our docs are consistent with the available source code in the future.
We are switching to a master/dev branch format for v3.0 and going forward. This will ensure the source code is consistent with the documentation.
Describe the bug
WecOptTool tries to index a string into the excitation coeff when running optimization with a wec created with the
from_impedance
method, which produces an index error whenexc_coeff
is a numpy array.To Reproduce
Steps to reproduce the behavior:
Minimum working example of an optimization where impedance and excitation are defined with numpy arrays.
Expected behavior
I expected this to run without error because the documentation indicates that
exc_coeff
should beArrayLike
.Observed behavior
The line
exc_coeff['omega'].values
seems to be assumingexc_coeff
is a dict, not an array.System:
Additional information
From #300 it seems like instead of a np array, an xarray is used, so I will try that for now.
The text was updated successfully, but these errors were encountered: