Skip to content

Commit

Permalink
Changed some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mghosh00 committed Dec 5, 2024
1 parent a82b2e9 commit d0564cd
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions pyEpiabm/pyEpiabm/routine/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,11 +487,9 @@ def write_to_serial_interval_file(self, times: np.array):
# Change to dataframe to get the data in a list of dicts format
df = pd.DataFrame(data_dict)

# The below is a list of dictionaries for each time step
list_of_dicts = df.to_dict(orient='records')
for dict_row in list_of_dicts:
# Write each time step in dictionary form
self.serial_interval_writer.write(dict_row)
for row_t in list_of_dicts:
self.serial_interval_writer.write(row_t)

def write_to_generation_time_file(self, times: np.array):
"""Records the intervals between an infector and an infectee getting
Expand Down Expand Up @@ -527,11 +525,9 @@ def write_to_generation_time_file(self, times: np.array):
# Change to dataframe to get the data in a list of dicts format
df = pd.DataFrame(data_dict)

# The below is a list of dictionaries for each time step
list_of_dicts = df.to_dict(orient='records')
for dict_row in list_of_dicts:
# Write each time step in dictionary form
self.generation_time_writer.write(dict_row)
for row_t in list_of_dicts:
self.generation_time_writer.write(row_t)

def add_writer(self, writer: AbstractReporter):
self.writers.append(writer)
Expand Down

0 comments on commit d0564cd

Please sign in to comment.