Skip to content

Commit

Permalink
Python 3 fix for profiling utils
Browse files Browse the repository at this point in the history
  • Loading branch information
mundya committed Aug 15, 2015
1 parent 6244a4c commit 21e1377
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nengo_spinnaker/utils/profiling.py
Expand Up @@ -42,7 +42,7 @@ def write_csv_header(profiling_data, csv_writer, extra_column_headers):
Write header row for standard profiler format CSV file with extra
column headers followed by tag names found in profiling_data
"""
csv_writer.writerow(extra_column_headers + list(profiling_data.iterkeys()))
csv_writer.writerow(extra_column_headers + list(profiling_data.keys()))


def write_csv_row(profiling_data, csv_writer, extra_column_values):
Expand All @@ -51,7 +51,7 @@ def write_csv_row(profiling_data, csv_writer, extra_column_values):
followed by mean times for each profiler tag extracted from profiling_data
"""
# Calculate mean of all profiling tags
mean_times = [np.average(t[1]) for t in profiling_data.itervalues()]
mean_times = [np.average(t[1]) for t in profiling_data.values()]

# Write extra column followed by means
csv_writer.writerow(extra_column_values + mean_times)

0 comments on commit 21e1377

Please sign in to comment.