Skip to content

Commit

Permalink
remove explicit float conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
KasukabeDefenceForce committed Oct 14, 2024
1 parent 70d81fd commit e7d152c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tardis/plasma/properties/nlte_rate_equation_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ def ion_matrix(ion_coefficients, atomic_number, ion_number):
offdiag = np.zeros(atomic_number)
index = ion_coefficients.index
for i in index:
offdiag[i] = float(ion_coefficients.loc[i].values[0])
offdiag[i] = ion_coefficients.loc[i].values[0]
diag = np.hstack([-offdiag, np.zeros(1)])
return (np.diag(diag) + np.diag(offdiag, k=-1))[ion_number, :]

Expand All @@ -957,7 +957,7 @@ def recomb_matrix(recomb_coefficients, atomic_number, ion_number):
offdiag = np.zeros(atomic_number)
index = recomb_coefficients.index
for i in index:
offdiag[i] = float(recomb_coefficients.loc[i].values[0])
offdiag[i] = recomb_coefficients.loc[i].values[0]
diag = np.hstack([np.zeros(1), -offdiag])
return (np.diag(diag) + np.diag(offdiag, k=1))[ion_number, :]

Expand Down

0 comments on commit e7d152c

Please sign in to comment.