def remove_neg(arr, val=0.0, ncore=None):
    """
    Replace negative values in array with a given value.

    Parameters