Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_correlation_many():
im = numpy.random.random((5, 10, 10))
ref = numpy.random.random((10, 10))
com = image_processing.correlation_centroid(im, ref, 0.3)
assert (com.shape[0] == 2)
assert(com.shape[1] == 5)
def test_correlation_error():
im = numpy.random.random((10))
ref = numpy.random.random((10, 10))
com = image_processing.correlation_centroid(im, ref, threshold=0.3)
def test_correlation_single():
im = numpy.random.random((10, 10))
ref = numpy.random.random((10, 10))
com = image_processing.correlation_centroid(im, ref, 0.3)
assert(com.shape[0] == 2)