Skip to content
This repository was archived by the owner on Jan 19, 2023. It is now read-only.

Update cca_core.py with correct numpy LinAlg error check #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion cca_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def robust_cca_similarity(acts1, acts2, threshold=0.98, epsilon=1e-6,
for trial in range(num_cca_trials):
try:
return_dict = get_cca_similarity(acts1, acts2, threshold, compute_dirns)
except np.LinAlgError:
except np.linalg.LinAlgError:
acts1 = acts1*1e-1 + np.random.normal(size=acts1.shape)*epsilon
acts2 = acts2*1e-1 + np.random.normal(size=acts1.shape)*epsilon
if trial + 1 == num_cca_trials:
Expand Down