[skimage] 21/24: Fix: use npz instead of npy format for matlab-output files

Andreas Tille tille at debian.org
Fri Dec 23 08:22:20 UTC 2016


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to tag v0.3.1
in repository skimage.

commit 7188841f52460df14e5dd6fc0b3ec42fd691e0b7
Author: cgohlke <cgohlke at uci.edu>
Date:   Tue Oct 11 17:23:30 2011 -0700

    Fix: use npz instead of npy format for matlab-output files
---
 scikits/image/morphology/tests/test_morphology.py | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/scikits/image/morphology/tests/test_morphology.py b/scikits/image/morphology/tests/test_morphology.py
index 5bde664..ff22c45 100644
--- a/scikits/image/morphology/tests/test_morphology.py
+++ b/scikits/image/morphology/tests/test_morphology.py
@@ -15,48 +15,49 @@ class TestMorphology():
     def morph_worker(self, img, fn, morph_func, strel_func):
         matlab_results = np.load(os.path.join(data_dir, fn))
         k = 0
-        for expected_result in matlab_results:
+        for arrname in sorted(matlab_results):
+            expected_result = matlab_results[arrname]
             mask = strel_func(k)
             actual_result = morph_func(lena, mask)
             assert_equal(expected_result, actual_result)
             k = k + 1
 
     def test_erode_diamond(self):
-        self.morph_worker(lena, "diamond-erode-matlab-output.npy",
+        self.morph_worker(lena, "diamond-erode-matlab-output.npz",
                           greyscale_erode, diamond)
 
     def test_dilate_diamond(self):
-        self.morph_worker(lena, "diamond-dilate-matlab-output.npy",
+        self.morph_worker(lena, "diamond-dilate-matlab-output.npz",
                           greyscale_dilate, diamond)
 
     def test_open_diamond(self):
-        self.morph_worker(lena, "diamond-open-matlab-output.npy",
+        self.morph_worker(lena, "diamond-open-matlab-output.npz",
                           greyscale_open, diamond)
 
     def test_close_diamond(self):
-        self.morph_worker(lena, "diamond-close-matlab-output.npy",
+        self.morph_worker(lena, "diamond-close-matlab-output.npz",
                           greyscale_close, diamond)
 
     def test_tophat_diamond(self):
-        self.morph_worker(lena, "diamond-tophat-matlab-output.npy",
+        self.morph_worker(lena, "diamond-tophat-matlab-output.npz",
                           greyscale_white_top_hat, diamond)
 
     def test_bothat_diamond(self):
-        self.morph_worker(lena, "diamond-bothat-matlab-output.npy",
+        self.morph_worker(lena, "diamond-bothat-matlab-output.npz",
                           greyscale_black_top_hat, diamond)
 
     def test_erode_disk(self):
-        self.morph_worker(lena, "disk-erode-matlab-output.npy",
+        self.morph_worker(lena, "disk-erode-matlab-output.npz",
                           greyscale_erode, disk)
 
     def test_dilate_disk(self):
-        self.morph_worker(lena, "disk-dilate-matlab-output.npy",
+        self.morph_worker(lena, "disk-dilate-matlab-output.npz",
                           greyscale_dilate, disk)
 
     def test_open_disk(self):
-        self.morph_worker(lena, "disk-open-matlab-output.npy",
+        self.morph_worker(lena, "disk-open-matlab-output.npz",
                           greyscale_open, disk)
 
     def test_close_disk(self):
-        self.morph_worker(lena, "disk-close-matlab-output.npy",
+        self.morph_worker(lena, "disk-close-matlab-output.npz",
                           greyscale_close, disk)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/skimage.git



More information about the debian-science-commits mailing list