Skip to content

Commit c6c5d63

Browse files
authored
Merge pull request #4 from toliwaga/dev
python3 compatible next() for generator
2 parents 1631676 + 28b527e commit c6c5d63

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

api/openmatrix/File.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ def shape(self):
110110

111111
# Inspect the first CArray object to determine its shape
112112
if len(self) > 0:
113-
self._shape = self.iter_nodes(self.root.data,'CArray').next().shape
113+
# jwd: generator has no next funtion in python 3
114+
# next() function supported in both in python 2.6+ and python 3
115+
self._shape = next(self.iter_nodes(self.root.data,'CArray')).shape
114116

115117
# Store it if we can
116118
if self._iswritable():

api/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
setup(
77
name='OpenMatrix',
88
keywords='openmatrix omx',
9-
version='0.3.4',
9+
version='0.3.4.1',
1010
author='Billy Charlton, Ben Stabler',
1111
author_email='billy@okbecause.com, benstabler@yahoo.com',
1212
packages=find_packages(),

0 commit comments

Comments
 (0)