@pytest.mark.parametrize(u'mode', [u'partial', u'trim', u'strict'])
def test_extract_array_easy(mode):
 large_test_array = np.zeros((11, 11))
 small_test_array = np.ones((5, 5))
 large_test_array[3:8, 3:8] = small_test_array
 extracted_array = extract_array(large_test_array, (5, 5), (5, 5), mode=mode)
 assert np.all((extracted_array == small_test_array))

@ pytest . mark . parametrize ( u'mode' , [ u'partial' , u'trim' , u'strict' ] ) def test_extract_array_easy ( mode ) : large_test_array = np . zeros ( ( 11 , 11 ) ) small_test_array = np . ones ( ( 5 , 5 ) ) large_test_array [ 3 : 8 , 3 : 8 ] = small_test_array extracted_array = extract_array ( large_test_array , ( 5 , 5 ) , ( 5 , 5 ) , mode = mode ) assert np . all ( ( extracted_array == small_test_array ) )
test extract_array utility function .