Skip to content

Commit 4013bf2

Browse files
committed
Remove a few unused imports
1 parent c283053 commit 4013bf2

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

axelrod/fingerprint.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import csv
21
import os
32
from collections import namedtuple
43
from tempfile import mkstemp
54
from typing import Any, List, Union
65

7-
import dask as da
86
import dask.dataframe as dd
97
import matplotlib.pyplot as plt
108
import numpy as np

axelrod/result_set.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1+
from collections import Counter, namedtuple
12
import csv
23
import itertools
3-
from collections import Counter, namedtuple
44
from multiprocessing import cpu_count
55

6-
import axelrod.interaction_utils as iu
76
import numpy as np
87
import tqdm
9-
from axelrod.action import Action, str_to_actions
8+
from axelrod.action import Action
109

1110
import dask as da
1211
import dask.dataframe as dd
1312

1413
from . import eigen
15-
from .game import Game
1614

1715
C, D = Action.C, Action.D
1816

@@ -416,7 +414,6 @@ def _build_normalised_cooperation(self):
416414

417415
@update_progress_bar
418416
def _build_initial_cooperation_rate(self, interactions_series):
419-
interactions_dict = interactions_series.to_dict()
420417
interactions_array = np.array(
421418
[
422419
interactions_series.get(player_index, 0)

axelrod/tournament.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,14 +253,8 @@ def _write_interactions_to_file(self, results, writer):
253253
) = results
254254
for index, player_index in enumerate(index_pair):
255255
opponent_index = index_pair[index - 1]
256-
row = [
257-
self.num_interactions,
258-
player_index,
259-
opponent_index,
260-
repetition,
261-
]
262-
row.append(str(self.players[player_index]))
263-
row.append(str(self.players[opponent_index]))
256+
row = [self.num_interactions, player_index, opponent_index, repetition,
257+
str(self.players[player_index]), str(self.players[opponent_index])]
264258
history = actions_to_str([i[index] for i in interaction])
265259
row.append(history)
266260

0 commit comments

Comments
 (0)