def test_no_nans():
 np.random.seed(1)
 image = (0.5 + (1e-09 * np.random.normal(size=(20, 20))))
 template = np.ones((6, 6))
 template[:3, :] = 0
 result = match_template(image, template)
 assert (not np.any(np.isnan(result)))

def test_no_nans ( ) : np . random . seed ( 1 ) image = ( 0.5 + ( 1e-09 * np . random . normal ( size = ( 20 , 20 ) ) ) ) template = np . ones ( ( 6 , 6 ) ) template [ : 3 , : ] = 0 result = match_template ( image , template ) assert ( not np . any ( np . isnan ( result ) ) )
test that match_template doesnt return nan values .