em-MRCZ / python-mrcz

Python module for compressed MRCZ-file format
Other
13 stars 4 forks source link

Syntax error in ioMRC.py with Python 2.7 #6

Closed mokca closed 6 years ago

mokca commented 6 years ago

The most recent commit seems to have introduced a syntax error in ioMRC.py with Python 2.7.

Python 2.7.14 |Anaconda, Inc.| (default, Oct 16 2017, 17:29:19) 
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mrcz
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/common/app/anaconda2/test/lib/python2.7/site-packages/mrcz/__init__.py", line 2, in <module>
    from mrcz.ioMRC import (readMRC, writeMRC, asyncReadMRC, asyncWriteMRC, 
  File "/common/app/anaconda2/test/lib/python2.7/site-packages/mrcz/ioMRC.py", line 514
    dims = np.array( [len(input_image), *input_image[0].shape])
                                        ^
SyntaxError: invalid syntax

The error doesn't occur with Python 3.6, but unfortunately I'm using mrcz as a dependency of another Python package that effectively limits me to 2.7 because of other dependencies.

(Ubuntu 16.04 LTS, Anaconda 5.0.1/Python 2.7)

robbmcleod commented 6 years ago

It should be fixed now, I made a few commits and as of 738551abc4259196e7b46126a137de11a53f73ed it's passing all tests. Let me know if you run into any further troubles.

I'll tag a release and upload the new version to PyPI.