def minimize_quadratic_1d(a, b, lb, ub, c=0):
    t = [lb, ub]
    if a != 0:
        extremum = -0.5 * b / a
        if lb < extremum < ub:
            t.append(extremum)
    t = np.asarray(t)
    y = a * t**2 + b * t + c
    min_index = np.argmin(y)
    return t[min_index], y[min_index]
Plot the amplitude envelope of a waveform.
dataset/ETHPy150Open scipy/scipy/scipy/optimize/_lsq/common.py/minimize_quadratic_1d--crossover with--dataset/ETHPy150Open bmcfee/librosa/librosa/display.py/waveplot