def METHOD_NAME():
    from mahotas.morph import locmax, locmin
    np.random.seed(123)
    for i in range(8):
        A = np.random.random_sample((64,64))
        A *= 255
        if (i % 2) == 0:
            A = A.astype(np.uint8)
        fast = locmax(A)
        assert np.all(fast == slow_reg(A, max))
        fast = locmin(A)
        assert np.all(fast == slow_reg(A, min))