def to_molar_ratio(massfrac_numerator, massfrac_denominator, numerator_mass, denominator_mass):
    """
    Converts per-mass concentrations to molar elemental ratios.
    
    Be careful with units.
    
    Parameters
    ----------
    numerator_mass, denominator_mass : float or array-like
        The atomic mass of the numerator and denominator.
    massfrac_numerator, massfrac_denominator : float or array-like
        The per-mass fraction of the numnerator and denominator.
    
    Returns
    -------
    float or array-like : The molar ratio of elements in the material
    """
    return (massfrac_numerator / numerator_mass) / (massfrac_denominator / denominator_mass)