(new_size, arr)
return res
Function ensuring that the size of numpy array is at least as specified
        Returns newly allocated array of bigger size with copied elements if existing size is less than requested
Function ensuring that the size of numpy array is at least as specified
        Returns newly allocated array of bigger size with copied elements if existing size is less than requested
Function ensuring that the size of numpy array is at least as specified Returns newly allocated array of bigger size with copied elements if existing size is less than requested
def _hpat_ensure_array_capacity(new_size, arr):
    """ Function ensuring that the size of numpy array is at least as specified
        Returns newly allocated array of bigger size with copied elements if existing size is less than requested
    """

    k = len(arr)
    if k >= new_size:
        return arr

    n = k
    while n < new_size:
        n = 2 * n
    res = numpy.empty(n, arr.dtype)
    res[:k] = arr[:k]
    return res
def _hpat_ensure_array_capacity ( new_size , arr ) : k = len ( arr ) if k >= new_size : return arr n = k while n < new_size : n = 2 * n res = numpy . empty ( n , arr . dtype ) res [ : k ] = arr [ : k ] return res