Skip to content

Commit

Permalink
re type
Browse files Browse the repository at this point in the history
  • Loading branch information
zhixiaozhu committed Oct 9, 2023
1 parent 5e0c441 commit 71f8414
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
4 changes: 1 addition & 3 deletions gpflow/models/gpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def predict_f(
def predict_y_faster(
self,
Xnew: InputData,
posteriors: InputData,
posteriors: posteriors.GPRPosterior,
full_cov: bool = False,
full_output_cov: bool = False,
) -> MeanAndVariance:
Expand All @@ -210,8 +210,6 @@ def predict_y_faster(
which is implenmented based on a given posteior.
"""

if not isinstance(posteriors, AbstractPosterior):
raise ValueError(f"{posteriors} is not a valid gpflow.posteriors")
f_mean, f_var = posteriors.predict_f(
Xnew, full_cov=full_cov, full_output_cov=full_output_cov
)
Expand Down
4 changes: 1 addition & 3 deletions gpflow/models/sgpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ def predict_f(
def predict_y_faster(
self,
Xnew: InputData,
posteriors: InputData,
posteriors: posteriors.SGPRPosterior,
full_cov: bool = False,
full_output_cov: bool = False,
) -> MeanAndVariance:
Expand All @@ -602,8 +602,6 @@ def predict_y_faster(
"""

if not isinstance(posteriors, AbstractPosterior):
raise ValueError(f"{posteriors} is not a valid gpflow.posteriors")
f_mean, f_var = posteriors.predict_f(
Xnew, full_cov=full_cov, full_output_cov=full_output_cov
)
Expand Down
4 changes: 1 addition & 3 deletions gpflow/models/svgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def predict_f(
def predict_y_faster(
self,
Xnew: InputData,
posteriors: InputData,
posteriors: posteriors.BasePosterior,
full_cov: bool = False,
full_output_cov: bool = False,
) -> MeanAndVariance:
Expand All @@ -276,8 +276,6 @@ def predict_y_faster(
"""

if not isinstance(posteriors, AbstractPosterior):
raise ValueError(f"{posteriors} is not a valid gpflow.posteriors")
f_mean, f_var = posteriors.predict_f(
Xnew, full_cov=full_cov, full_output_cov=full_output_cov
)
Expand Down
4 changes: 1 addition & 3 deletions gpflow/models/vgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def predict_f(
def predict_y_faster(
self,
Xnew: InputData,
posteriors: InputData,
posteriors: posteriors.VGPPosterior,
full_cov: bool = False,
full_output_cov: bool = False,
) -> MeanAndVariance:
Expand All @@ -236,8 +236,6 @@ def predict_y_faster(
"""

if not isinstance(posteriors, AbstractPosterior):
raise ValueError(f"{posteriors} is not a valid gpflow.posteriors")
f_mean, f_var = posteriors.predict_f(
Xnew, full_cov=full_cov, full_output_cov=full_output_cov
)
Expand Down

0 comments on commit 71f8414

Please sign in to comment.