Skip to content

Commit

Permalink
free orient reshape
Browse files Browse the repository at this point in the history
  • Loading branch information
anujanegi committed Jun 23, 2023
1 parent 5a53bde commit 1a65b78
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bsi_zoo/estimators.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,9 @@ def eloreta(L, y, cov=1, alpha=1 / 9, n_orient=1):
# alpha is lambda2
K = _compute_eloreta_kernel(L, lambda2=alpha, n_orient=n_orient, whitener=whitener)
x = K @ y # get the source time courses with simple dot product

if n_orient > 1:
x = x.reshape((-1, n_orient, x.shape[1]))
return x


Expand Down Expand Up @@ -888,6 +891,9 @@ def gamma_map(
x_hat = np.zeros((L.shape[1], y.shape[1]))
x_hat[active_set] = x_hat_

if n_orient > 1:
x_hat = x_hat.reshape((-1, n_orient, x_hat.shape[1]))

return x_hat


Expand Down

0 comments on commit 1a65b78

Please sign in to comment.