def overSamplerConnector2D(size_in, size_out, weights, delays):
    """
    This function builds the inverse of a subSamplerConnector: an overSampler which 
    maps from a smaller population onto a larger population of neurons
    Returns a list that can then be used with the FromList Connector
    The output is a connectivity matrix which will oversample the input population
    
    size_in = size of the input population (2D = size_in x size_in)    
    size_out = size of the sampled population
    weights = averaging weight value (each connection will have this value) must be float
    delays = averaging delay value (each connection will have this value)
    """
    out = []
    step = size_out/size_in
    for i in range(size_in):
         for j in range(size_in):
            out = out + [(i*size_in + j, (i*step+i_out)*size_out + (j*step+j_out), weights, delays) for i_out in range(step) for j_out in range(step)] # Python really is magic                    
    return out