Skip to content

Commit

Permalink
Replacing iloc with values
Browse files Browse the repository at this point in the history
  • Loading branch information
KasukabeDefenceForce committed Oct 10, 2024
1 parent 20f46d1 commit 2ce2a49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tardis/plasma/properties/nlte_rate_equation_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,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].iloc[0])
offdiag[i] = float(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 Down

0 comments on commit 2ce2a49

Please sign in to comment.