def scaleFromRedshift(redshift):
    """
    Converts a redshift to a scale factor.

    :param redshift: redshift of the object
    :type redshift: float or ndarray

    :return: scale factor
    :rtype: float or ndarray
    """
    return 1. / (redshift + 1.)