def nystrom_extension(C, e_vec, e_val):
n,l = C.shape<EOL>W = C[<NUM_LIT:0>:l, :]<EOL>eval_nystrom = (n/l)*e_val<EOL>eval_inv = e_val.copy()<EOL>e_nonzero = np.where(e_val != <NUM_LIT:0>)<EOL>eval_inv[e_nonzero] = <NUM_LIT:1.0>/e_val[e_nonzero]<EOL>if isspmatrix(C):<EOL><INDENT>evec_nystrom = np.sqrt(l/n)*C.dot(e_vec)*eval_inv<EOL><DEDENT>else:<EOL><INDENT>evec_nystrom = np.sqrt(l/n)*np.dot(C,e_vec)*eval_inv<EOL><DEDENT>return eval_nystrom,evec_nystrom<EOL>
Parameters
----------
C: array-like, shape = (n, l)
  Stacking the training and testing data where n
  is the total number of data and l is the number of 
  training data.
e_val: array, shape = (1,s)
  If W equals to C[0:l, :], then e_val are the largest s
  eig values of W
e_vec: array-like, shape = (l, s)
  These are the corresponding eig vectors to e_val

Returns
-------
eval_nystrom: array-like, shape = (1,s)
  These are the estimated largest s eig values of the matrix where C is the 
  first l columns.
evec_nystrom: arrau-like, shape = (n, s)
  These are the corresponding eig vectors to eval_nystrom