mirror of
https://github.com/wassname/scikit-image.git
synced 2026-10-30 13:40:44 +08:00
Add basic tests for _histograms.
This commit is contained in:
1 parent
0cc86e62c5
commit
a99339f9d6
2 files changed
+16
No files matched your search
File renamed without changes.
@@ -0,0 +1,16 @@
|
||||
from numpy.testing import *
|
||||
import numpy as np
|
||||
|
||||
import scikits.image.io._plugins._colormixer as cm
|
||||
from scikits.image.io._plugins._histograms import histograms
|
||||
|
||||
class TestHistogram:
|
||||
def test_basic(self):
|
||||
img = np.ones((50, 50, 3), dtype=np.uint8)
|
||||
r, g, b, v = histograms(img, 255)
|
||||
|
||||
for band in (r, g, b, v):
|
||||
yield assert_equal, band.sum(), 50*50
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_module_suite()
|
||||
Reference in new issue
Block a user