@@ -356,7 +356,7 @@ def create_packets(
356356 cumulative_decays_df : pd .DataFrame ,
357357 number_of_packets : int ,
358358 legacy_energy_per_packet : float | None = None ,
359- ) -> GXPacketCollection :
359+ ):
360360 """
361361 Initialize a collection of gamma ray packets for simulation.
362362
@@ -443,7 +443,7 @@ def create_packets(
443443
444444 # get the isotopes and shells of the sampled packets
445445 source_isotopes = sampled_packets_df .index .get_level_values ("isotope" )
446- shells = sampled_packets_df .index .get_level_values ("shell_number" )
446+ shells = sampled_packets_df .index .get_level_values ("shell_number" ). to_numpy ()
447447
448448 # get the inner and outer velocity boundaries for each packet to compute
449449 sampled_packets_df ["inner_velocity" ] = self .inner_velocities [shells ]
@@ -453,7 +453,7 @@ def create_packets(
453453 initial_velocities = self .create_packet_velocities (sampled_packets_df )
454454
455455 # get the time step index of the packets
456- decay_time_indices = sampled_packets_df .index .get_level_values ("time_index" )
456+ decay_time_indices = sampled_packets_df .index .get_level_values ("time_index" ). to_numpy ()
457457
458458 effective_decay_times = self .times [decay_time_indices ]
459459
@@ -508,8 +508,7 @@ def create_packets(
508508 shells ,
509509 effective_decay_times ,
510510 decay_time_indices ,
511- source_isotopes = source_isotopes ,
512- )
511+ ), source_isotopes
513512
514513
515514def legacy_calculate_positron_fraction (
0 commit comments