From 08f8935e6665b242b89eee6c93d72e411a2bf8fa Mon Sep 17 00:00:00 2001 From: Pranav Goel Date: Fri, 5 Apr 2019 23:04:31 -0400 Subject: [PATCH] Update cca_core.py with correct numpy LinAlg error check --- cca_core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cca_core.py b/cca_core.py index 00aaa50..47df61f 100644 --- a/cca_core.py +++ b/cca_core.py @@ -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: