Skip to content

Commit

Permalink
🐛 uses six.zip for py2/3 compat
Browse files Browse the repository at this point in the history
better
  • Loading branch information
Justin Kiggins committed Apr 24, 2018
1 parent e528280 commit 44e235b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions neuroglia/datasets/crcns.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
import os
import tarfile
from collections import namedtuple
from itertools import izip
import requests
import pandas as pd
import numpy as np
from sklearn.datasets.base import _sha256, _pkl_filepath
from sklearn.utils import Bunch
from .utils import get_neuroglia_data_home

try:
from itertools import izip as zip
except ImportError: # must be python3
pass

URL = 'https://portal.nersc.gov/project/crcns/download/index.php'


Expand Down Expand Up @@ -127,7 +131,7 @@ def read_spikes_from_tar(f):

ts = f.extractfile(timestamps)
clu = f.extractfile(clusters)
for frame,cluster in izip(ts.readlines(),clu.readlines()):
for frame,cluster in zip(ts.readlines(),clu.readlines()):
if int(cluster)>1:
spike = dict(
time=float(frame) / SPIKES_HZ,
Expand Down

0 comments on commit 44e235b

Please sign in to comment.