Skip to content

Commit

Permalink
row_stack --> vstack
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusMNoack committed Oct 16, 2024
1 parent 618f111 commit 7f074ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions fvgp/fvgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,12 +419,12 @@ def update_gp_data(
if noise_variances_new is not None:
assert isinstance(noise_variances_new, np.ndarray) or isinstance(noise_variances_new, list)
if isinstance(noise_variances_new, np.ndarray): self.fvgp_noise_variances = (
np.row_stack([self.fvgp_noise_variances, noise_variances_new]))
np.vstack([self.fvgp_noise_variances, noise_variances_new]))
if isinstance(noise_variances_new, list): self.fvgp_noise_variances = (
self.fvgp_noise_variances + noise_variances_new)
if isinstance(x_new, np.ndarray): self.fvgp_x_data = np.row_stack([self.fvgp_x_data, x_new])
if isinstance(x_new, np.ndarray): self.fvgp_x_data = np.vstack([self.fvgp_x_data, x_new])
if isinstance(x_new, list): self.fvgp_x_data = self.fvgp_x_data + x_new
if isinstance(y_new, np.ndarray): self.fvgp_y_data = np.row_stack([self.fvgp_y_data, y_new])
if isinstance(y_new, np.ndarray): self.fvgp_y_data = np.vstack([self.fvgp_y_data, y_new])
if isinstance(y_new, list): self.fvgp_y_data = self.fvgp_y_data + y_new
else:
self.fvgp_noise_variances = noise_variances_new
Expand Down
2 changes: 1 addition & 1 deletion fvgp/gp_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def update(self, x_data_new, y_data_new, noise_variances_new=None, append=True):
self.y_data = y_data_new
self.noise_variances = noise_variances_new
else:
if self.Euclidean: self.x_data = np.row_stack([self.x_data, x_data_new])
if self.Euclidean: self.x_data = np.vstack([self.x_data, x_data_new])
else: self.x_data = self.x_data + x_data_new
self.y_data = np.append(self.y_data, y_data_new)
if isinstance(noise_variances_new, np.ndarray):
Expand Down

0 comments on commit 7f074ab

Please sign in to comment.