@classmethod<EOL><INDENT>def from_spline(cls, tck, extrapolate=None):<DEDENT>
t, c, k = tck<EOL>cvals = np.empty((k + <NUM_LIT:1>, len(t)-<NUM_LIT:1>), dtype=c.dtype)<EOL>for m in xrange(k, -<NUM_LIT:1>, -<NUM_LIT:1>):<EOL><INDENT>y = fitpack.splev(t[:-<NUM_LIT:1>], tck, der=m)<EOL>cvals[k - m, :] = y/spec.gamma(m+<NUM_LIT:1>)<EOL><DEDENT>return cls.construct_fast(cvals, t, extrapolate)<EOL>
Construct a piecewise polynomial from a spline

Parameters
----------
tck
    A spline, as returned by `splrep`
extrapolate : bool, optional
    Whether to extrapolate to ouf-of-bounds points based on first
    and last intervals, or to return NaNs. Default: True.