changeset 177:be714ac9bcbd

Use izip(), not zip() to return a lazy iterator. (datasets)
author Arnaud Bergeron <abergeron@gmail.com>
date Sat, 27 Feb 2010 14:15:11 -0500
parents d6672a7daea5
children 938bd350dbf0
files datasets/ftfile.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/datasets/ftfile.py	Sat Feb 27 14:10:14 2010 -0500
+++ b/datasets/ftfile.py	Sat Feb 27 14:15:11 2010 -0500
@@ -2,6 +2,7 @@
 import numpy
 from dataset import DataSet
 from dsetiter import DataIterator
+from itertools import izip
 
 class FTFile(object):
     def __init__(self, fname):
@@ -180,5 +181,5 @@
         self._test = FTData(test_data, test_lbl)
 
     def _return_it(self, batchsize, bufsize, ftdata):
-        return zip(DataIterator(ftdata.open_inputs(), batchsize, bufsize),
+        return izip(DataIterator(ftdata.open_inputs(), batchsize, bufsize),
                    DataIterator(ftdata.open_outputs(), batchsize, bufsize))