Skip to content

Commit

Permalink
Fix: Convert spectrum into numpy array
Browse files Browse the repository at this point in the history
This fixes a bug where the conversion from MATLAB to python was not
compatible. This follows the same pattern as `energy_period.m`
  • Loading branch information
simmsa committed Nov 29, 2023
1 parent dd34883 commit 40cd75e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mhkit/wave/resource/energy_period.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
li=py.mhkit_python_utils.pandas_dataframe.lis(li,app);

end
S=py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(double(S.frequency(:,1)),li,int32(x(2)));
S=py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(double(S.frequency(:,1)),li,x(2));
elseif x(2)==1
S=py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(double(S.frequency),double(S.spectrum),int32(x(2)));
S=py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(double(S.frequency),py.numpy.array(S.spectrum),x(2));
end

else
Expand Down

0 comments on commit 40cd75e

Please sign in to comment.