def _naive_eval(x, t, c, k):
 if (x == t[k]):
  i = k
 else:
  i = (np.searchsorted(t, x) - 1)
 assert (t[i] <= x <= t[(i + 1)])
 assert ((i >= k) and (i < (len(t) - k)))
 return sum(((c[(i - j)] * _naive_B(x, k, (i - j), t)) for j in range(0, (k + 1))))

def _naive_eval ( x , t , c , k ) : if ( x == t [ k ] ) : i = k else : i = ( np . searchsorted ( t , x ) - 1 ) assert ( t [ i ] <= x <= t [ ( i + 1 ) ] ) assert ( ( i >= k ) and ( i < ( len ( t ) - k ) ) ) return sum ( ( ( c [ ( i - j ) ] * _naive_B ( x , k , ( i - j ) , t ) ) for j in range ( 0 , ( k + 1 ) ) ) )
naive b-spline evaluation .