From b98d02bce2a8a98cb8d72855df56f1af7ae48702 Mon Sep 17 00:00:00 2001 From: Alexander Holas Date: Wed, 1 Nov 2023 16:57:25 -0400 Subject: [PATCH] Fix deprecated series index --- tardis/plasma/properties/nlte_rate_equation_solver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tardis/plasma/properties/nlte_rate_equation_solver.py b/tardis/plasma/properties/nlte_rate_equation_solver.py index e3be83c383c..487b93ad5a3 100644 --- a/tardis/plasma/properties/nlte_rate_equation_solver.py +++ b/tardis/plasma/properties/nlte_rate_equation_solver.py @@ -595,7 +595,7 @@ def prepare_first_guess( """ first_guess = pd.Series(0.0, index=rate_matrix_index) for atomic_number in atomic_numbers: - first_guess.loc[(atomic_number, 1)][0] = number_density.loc[ + first_guess.loc[(atomic_number, 1)].iloc[0] = number_density.loc[ atomic_number ] # TODO: After the first iteration, the new guess can be the old solution.