def subtract_electronic_background(signal, background_signal):
    """
    Subtract the electronic background profile from the signal.

    The signal can be either a 1D array or a 2D array with dimensions (time, range).

    Parameters
    ----------
    signal: int or float array
       The lidar signal profile.
    background_signal: int or float array
       Electronic background profile.

    Returns
    -------
    output_singal: array
       The array with the corrected signal.
    """
    corrected_signal = signal - background_signal
    return corrected_signal
