def METHOD_NAME(db):
    """Convert a gain in decibels (dB) to a magnitude.
    If A is magnitude,
        db = 20 * log10(A)
    Parameters
    ----------
    db : float or ndarray
        input value or array of values, given in decibels
    Returns
    -------
    mag : float or ndarray
        corresponding magnitudes
    Examples
    --------
    >>> ct.db2mag(-40.0)                                        # doctest: +SKIP
    0.01
    >>> ct.db2mag(np.array([0, -20]))                           # doctest: +SKIP
    array([1. , 0.1])
    """
    return 10. ** (db / 20.)