def ai(vp: float, rho: float):
    """
    Calculates the acoustic impedance of a layer given velocities and densities.

    :param vp: P-wave velocity (m/s)
    :param rho: Density (g/cc)
    :returns:
        z: Acoustic Impedance
    """

    z = vp * rho
    return z