Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT: Added elif statement MarginalizingNmat.solve to allow for 2D left_array #402

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions enterprise/signals/gp_signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -876,5 +876,13 @@ def solve(self, right, left_array=None, logdet=False):

TNT = self.Nmat.solve(T, left_array=T)
return TNT - np.tensordot(self.MNF(T), self.MNMMNF(T), (0, 0))
elif left_array is not None and right.ndim == left_array.ndim and right.ndim <= 2:
# needed for Fe calculation and OS statistics
T = right
L = left_array

LNT = self.Nmat.solve(T, left_array=L)

return LNT - np.tensordot(self.MNF(L), self.MNMMNF(T), (0, 0))
else:
raise ValueError("Incorrect arguments given to MarginalizingNmat.solve.")