def choice_impl(a, size=None, replace=True):
            """
            choice() implementation returning a single sample
            (note *replace* is ignored)
            """
            n = get_source_size(a)
            i = np.random.randint(0, n)
            return getitem(a, i)

            choice() implementation returning a single sample
            (note *replace* is ignored)
            
numba/cpython/randomimpl.py