def checker(z):
    """
    :param z: a 2d array of complex type.
    For each entry in z, it lies in an unique unit square with left-bottom corner
    at lattice site (m, n) where (m, n) are both integers. Return a bool array of
    the same shape with its corresponding entry is True if m, n have the same parity
    else it's False.
    """
    fx = ((z.real / 2) % 1) * 2 - 1
    fy = ((z.imag / 2) % 1) * 2 - 1
    return fx * fy > 0