diff options
author | Robert Kern <robert.kern@gmail.com> | 2008-03-11 20:37:07 +0000 |
---|---|---|
committer | Robert Kern <robert.kern@gmail.com> | 2008-03-11 20:37:07 +0000 |
commit | d1eeb416dc067c0dda65a2904c8942ee2a20b381 (patch) | |
tree | d72be9b744a5baaa16143912372b1f569e6f1722 /numpy/ma/extras.py | |
parent | c33da3d52c80d2b545ed0a86383b3c8f37d299a9 (diff) | |
download | numpy-d1eeb416dc067c0dda65a2904c8942ee2a20b381.tar.gz |
BUG: Python 2.3 compatibility. We cannot use generator expressions in numpy.
Diffstat (limited to 'numpy/ma/extras.py')
-rw-r--r-- | numpy/ma/extras.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/ma/extras.py b/numpy/ma/extras.py index 4ebb6ca2f..6324e3190 100644 --- a/numpy/ma/extras.py +++ b/numpy/ma/extras.py @@ -756,7 +756,7 @@ def flatnotmasked_contiguous(a): return None result = [] for k, group in groupby(enumerate(unmasked), lambda (i,x):i-x): - tmp = numpy.fromiter((g[1] for g in group), int_) + tmp = numpy.array([g[1] for g in group], int_) # result.append((tmp.size, tuple(tmp[[0,-1]]))) result.append( slice(tmp[0],tmp[-1]) ) result.sort() |