def _not_a_knot(x, k):
 x = np.asarray(x)
 if ((k % 2) != 1):
  raise ValueError(('Odd degree for now only. Got %s.' % k))
 m = ((k - 1) // 2)
 t = x[(m + 1):((- m) - 1)]
 t = np.r_[(((x[0],) * (k + 1)), t, ((x[(-1)],) * (k + 1)))]
 return t

def _not_a_knot ( x , k ) : x = np . asarray ( x ) if ( ( k % 2 ) != 1 ) : raise ValueError ( ( 'Odd degree for now only. Got %s.' % k ) ) m = ( ( k - 1 ) // 2 ) t = x [ ( m + 1 ) : ( ( - m ) - 1 ) ] t = np . r_ [ ( ( ( x [ 0 ] , ) * ( k + 1 ) ) , t , ( ( x [ ( - 1 ) ] , ) * ( k + 1 ) ) ) ] return t
given data x .