scikits-image/scikits.image — pull request #54 by cgohlke (2011-10-12 00:46:25+00:00)
Title: Fix: use npz instead of npy format for matlab-output files

There are 10 test errors on Python 3 because the scikits/image/data/*matlab-output.npy files contain pickled objects that can not be read with Python 3:

`UnicodeDecodeError: 'ascii' codec can't decode byte 0x8d in position 5737: ordinal not in range(128)`

The proposed fix uses the npz format, which allows to store multiple arrays in a single file.

The existing npy files can be converted to npz by running the following Python 2.7 script in the scikits/image/data directory:

```
import glob
import numpy

for fn in glob.glob("*matlab-output.npy"):
images = numpy.load(fn)
images = dict(("%03i" %i, j) for i,j in enumerate(images))
numpy.savez_compressed(fn[:-3]+'npz', **images)
```

numpy.savez() could be used instead of numpy.savez_compressed().

Tested with numpy 1.6.1 on Windows.