Skip to content

Commit 5a52703

Browse files
authored
Merge pull request #32 from liamtoney/patch-1
Fix NumPy "complex" deprecation
2 parents 44a332e + 036f2ec commit 5a52703

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lts_array/classes/lts_classes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,10 @@ def quadraticEqn(a, b, c):
451451
# note np.sqrt(-1) = nan, so force complex argument
452452
if b:
453453
# std. sub-branch
454-
q = -0.5*(b + np.sign(b) * np.sqrt(np.complex(b * b - 4 * a * c)))
454+
q = -0.5*(b + np.sign(b) * np.sqrt(complex(b * b - 4 * a * c)))
455455
else:
456456
# b = 0 sub-branch
457-
q = -np.sqrt(np.complex(-a * c))
457+
q = -np.sqrt(complex(-a * c))
458458
# complex coefficient branch
459459
else:
460460
if np.real(np.conj(b) * np.sqrt(b * b - 4 * a * c)) >= 0:

0 commit comments

Comments
 (0)