def _accumulate_array_results(self, func, nresults):
        """
        Accumulate array results produced by *func* until they reach
        *nresults* elements.
        """
        res = []
        while len(res) < nresults:
            res += list(func().flat)
        return res[:nresults]
dataset/ETHPy150Open numba/numba/numba/tests/test_random.py/TestRandomChoice._accumulate_array_results/original