Skip to content

Commit

Permalink
Switch from matmul to at
Browse files Browse the repository at this point in the history
  • Loading branch information
tsbinns committed Jun 12, 2024
1 parent 8afa1b0 commit b8b57bb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mne_connectivity/spectral/epochs_multivariate.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,8 @@ def _compute_mic(self, E, C, seed_idcs, target_idcs, U_bar_aa, U_bar_bb, con_i):
beta = V_targets[times[:, None], freqs, :, w_targets.argmax(axis=2)]

# Part of Eqs. 46 & 47; i.e. transform filters to channel space
alpha_Ubar = np.matmul(U_bar_aa, np.expand_dims(alpha, axis=3))
beta_Ubar = np.matmul(U_bar_bb, np.expand_dims(beta, axis=3))
alpha_Ubar = U_bar_aa @ np.expand_dims(alpha, axis=3)
beta_Ubar = U_bar_bb @ np.expand_dims(beta, axis=3)

# Eq. 46 (seed spatial patterns)
self.patterns[0, con_i, :n_seeds] = (
Expand Down Expand Up @@ -660,8 +660,8 @@ def _compute_patterns(
beta = T_bb @ np.expand_dims(b, axis=3) # filter for targets

# Eqs. 46 & 47 of Ewald et al. (2012); i.e. transform filters to channel space
alpha_Ubar = np.matmul(U_bar_aa, alpha)
beta_Ubar = np.matmul(U_bar_bb, beta)
alpha_Ubar = U_bar_aa @ alpha
beta_Ubar = U_bar_bb @ beta

# Eq. 14
# seed spatial patterns
Expand Down

0 comments on commit b8b57bb

Please sign in to comment.