'Accumulate array results produced by *func* until they reach
*nresults* elements.'

def _accumulate_array_results(self, func, nresults):

    res = []
    while (len(res) < nresults):
        res += list(func().flat)
    return res[:nresults]
