mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-01 06:34:23 +08:00
TST: add test for invalid normalization type in NRMSE
This commit is contained in:
@@ -40,8 +40,13 @@ def test_NRMSE():
|
||||
|
||||
assert_equal(nrmse(x, x), 0)
|
||||
|
||||
assert_raises(ValueError, nrmse, x.astype(np.uint8), y)
|
||||
assert_raises(ValueError, nrmse, x[:-1], y)
|
||||
|
||||
def test_NRMSE_errors():
|
||||
x = np.ones(4)
|
||||
assert_raises(ValueError, nrmse, x.astype(np.uint8), x.astype(np.float32))
|
||||
assert_raises(ValueError, nrmse, x[:-1], x)
|
||||
# invalid normalization name
|
||||
assert_raises(ValueError, nrmse, x, x, 'foo')
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user