def alt_sg_coeffs(window_length, polyorder, pos):
if pos is None:<EOL><INDENT>pos = window_length // <NUM_LIT:2><EOL><DEDENT>t = np.arange(window_length)<EOL>unit = (t == pos).astype(int)<EOL>h = np.polyval(np.polyfit(t, unit, polyorder), t)<EOL>return h<EOL>
This is an alternative implementation of the SG coefficients.

    It uses numpy.polyfit and numpy.polyval.  The results should be
    equivalent to those of savgol_coeffs(), but this implementation
    is slower.

    window_length should be odd.