peng/wave_core.py
def _verify_compatibility(wave_a, wave_b, check_dep_units=True):
    """Verify that two waveforms can be combined with various mathematical functions."""
    exobj = pexdoc.exh.addex(RuntimeError, "Waveforms are not compatible")
    ctuple = (
        bool(wave_a.indep_scale != wave_b.indep_scale),
        bool(wave_a.dep_scale != wave_b.dep_scale),
        bool(wave_a.indep_units != wave_b.indep_units),
        (bool(wave_a.dep_units != wave_b.dep_units) if check_dep_units else False),
        bool(wave_a.interp != wave_b.interp),
    )
    exobj(any(ctuple))
def _verify_compatibility(wave_a, wave_b, check_dep_units=True):
    """Verify that two waveforms can be combined with various mathematical functions."""
    exobj = pexdoc.exh.addex(RuntimeError, "Waveforms are not compatible")
    ctuple = (
        bool(wave_a.indep_scale != wave_b.indep_scale),
        bool(wave_a.dep_scale != wave_b.dep_scale),
        bool(wave_a.indep_units != wave_b.indep_units),
        (bool(wave_a.dep_units != wave_b.dep_units) if check_dep_units else False),
        bool(wave_a.interp != wave_b.interp),
    )
    exobj(any(ctuple))
Verify that two waveforms can be combined with various mathematical functions.