Skip to content

Commit 154c7d8

Browse files
authored
Merge pull request #238 from zhi-yi-huang/main
Fix scoreutils
2 parents 69071e9 + 095d190 commit 154c7d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

causallearn/utils/ScoreUtils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -619,15 +619,15 @@ def cov_seard(loghyper=None, x=None, z=None, nargout=1):
619619
sf2 = np.exp(2 * loghyper[D]) # signal variance
620620

621621
if loghyper is not None and x is not None:
622-
K = sf2 * np.exp(-sq_dist(np.diag(1 / ell) * x.T) / 2)
622+
K = sf2 * np.exp(-sq_dist(np.diag(1 / ell) @ x.T) / 2)
623623
A = K
624624
elif nargout == 2: # compute test set covariances
625625
A = sf2 * np.ones((z, 1))
626-
B = sf2 * np.exp(-sq_dist(np.diag(1 / ell) * x.T, np.diag(1 / ell) * z) / 2)
626+
B = sf2 * np.exp(-sq_dist(np.diag(1 / ell) @ x.T, np.diag(1 / ell) @ z) / 2)
627627
else:
628628
# check for correct dimension of the previously calculated kernel matrix
629629
if K.shape[0] != n or K.shape[1] != n:
630-
K = sf2 * np.exp(-sq_dist(np.diag(1 / ell) * x.T) / 2)
630+
K = sf2 * np.exp(-sq_dist(np.diag(1 / ell) @ x.T) / 2)
631631

632632
if z <= D: # length scale parameters
633633
A = np.multiply(K, sq_dist(x[:, z].T / ell[z]))

0 commit comments

Comments
 (0)