Skip to content

Commit

Permalink
Merge pull request #132 from efiring/fix_warnings
Browse files Browse the repository at this point in the history
Simplify ut_linci.
  • Loading branch information
ocefpaf authored Oct 29, 2024
2 parents 6f4a1d0 + 708ce8b commit 7cc68c5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,6 @@ doc/_build/
.pydevproject
.vscode/
utide/_version.py

# Mac
.DS_Store
16 changes: 6 additions & 10 deletions utide/confidence.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,19 +423,15 @@ def ut_linci(X, Y, sigX, sigY):
# UTide v1p0 9/2011 [email protected]
# (adapted from errell.m of t_tide, Pawlowicz et al 2002)

X = np.array([X])
Y = np.array([Y])
sigX = np.array([sigX])
sigY = np.array([sigY])
Xu = np.real(X[:])
Xu = np.real(X)
sigXu = np.real(sigX)
Yu = np.real(Y[:])
Yu = np.real(Y)
sigYu = np.real(sigY)

Xv = np.imag(X[:])
sigXv = np.imag(sigX[:])
Yv = np.imag(Y[:])
sigYv = np.imag(sigY[:])
Xv = np.imag(X)
sigXv = np.imag(sigX)
Yv = np.imag(Y)
sigYv = np.imag(sigY)

rp = 0.5 * np.sqrt((Xu + Yv) ** 2 + (Xv - Yu) ** 2)
rm = 0.5 * np.sqrt((Xu - Yv) ** 2 + (Xv + Yu) ** 2)
Expand Down

0 comments on commit 7cc68c5

Please sign in to comment.