@@ -204,12 +204,12 @@ def compute_operator(self, X, Y, kernel_function, updating=False):
204204
205205 # Get the results of this Cholesky factorization iteration.
206206 if self ._online :
207- results = self ._cholesky_step (
207+ cholesky_results = self ._cholesky_step (
208208 x_t , kernel_function , self ._cholesky
209209 )
210210 else :
211- results = self ._cholesky_step (x_t , kernel_function , C )
212- _ , s_t , _ , k_tt , delta_t = results
211+ cholesky_results = self ._cholesky_step (x_t , kernel_function , C )
212+ _ , s_t , _ , k_tt , delta_t = cholesky_results
213213
214214 # NOT almost linearly dependent - add x to the dictionary.
215215 if np .abs (delta_t ) > self ._dict_tol :
@@ -222,7 +222,9 @@ def compute_operator(self, X, Y, kernel_function, updating=False):
222222 self ._cholesky = self ._update_cholesky (
223223 self ._cholesky , s_t , k_tt
224224 )
225- self ._update_online (y_t , results , cholesky_updated = True )
225+ self ._update_online (
226+ y_t , cholesky_results , cholesky_updated = True
227+ )
226228 else :
227229 C = self ._update_cholesky (C , s_t , k_tt )
228230
@@ -235,8 +237,11 @@ def compute_operator(self, X, Y, kernel_function, updating=False):
235237
236238 # Online learning updates for the almost linearly dependent case.
237239 elif self ._online :
238- self ._update_online (y_t , results , cholesky_updated = False )
240+ self ._update_online (
241+ y_t , cholesky_results , cholesky_updated = False
242+ )
239243
244+ # Compute weights in one go, if not performing online learning.
240245 if not self ._online :
241246 K_mat = kernel_function (self ._sparse_dictionary , X )
242247 if self ._lstsq : # use least squares
0 commit comments