Skip to content

Commit

Permalink
Update waves.py for nfreq=1 (#312)
Browse files Browse the repository at this point in the history
* Update waves.py for nfreq=1

* update degrees_to_radians

Remove line that selects item() of degrees_to_radians
  • Loading branch information
jtgrasb authored Jan 25, 2024
1 parent 598e875 commit 528c679
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions wecopttool/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2309,9 +2309,7 @@ def degrees_to_radians(
"""
radians = np.asarray(np.remainder(np.deg2rad(degrees), 2*np.pi))
radians[radians > np.pi] -= 2*np.pi
if radians.size == 1:
radians = radians.item()
elif sort:
if radians.size > 1 and sort:
radians = np.sort(radians)
return radians

Expand Down

0 comments on commit 528c679

Please sign in to comment.