Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
samikane committed Nov 25, 2020
1 parent d9d6ce5 commit 63c165f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions hnn_core/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,16 @@ def read_spikes(fname, gid_ranges=None):
spike_times += [list(spike_trial[:, 0].astype(float))]
spike_gids += [list(spike_trial[:, 1].astype(int))]

# Note that legacy HNN 'spk.txt' files don't contain a 3rd column for
# spike type. If reading a legacy version, validate that a gid_dict is
# provided.
# Note that legacy HNN 'spk.txt' files don't contain a 3rd column
# for spike type. If reading a legacy version, validate that a
# gid_dict is provided.
if spike_trial.shape[1] == 3:
spike_types += [list(spike_trial[:, 2].astype(str))]
else:
if gid_ranges is None:
raise ValueError("gid_ranges must be provided if spike types "
"are unspecified in the file %s" % (file,))
raise ValueError("gid_ranges must be provided if spike "
"types are unspecified in the "
"file %s" % (file,))
spike_types += [[]]
else:
spike_times += [[]]
Expand Down

0 comments on commit 63c165f

Please sign in to comment.