From 53b5c63c86fbe52879c88453d659ba0b8a2ae2a4 Mon Sep 17 00:00:00 2001 From: mxr612 Date: Wed, 15 May 2024 14:25:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E6=97=B6=E9=97=B4=20r=E5=AF=B9=E4=BA=8Ei=EF=BC=8Cj=E5=92=8Cj?= =?UTF-8?q?=EF=BC=8Ci=E5=8F=AA=E8=AE=A1=E7=AE=97=E4=B8=80=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- file_load.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/file_load.py b/file_load.py index 47b559e..3ec6645 100644 --- a/file_load.py +++ b/file_load.py @@ -81,9 +81,13 @@ def corelation(): que={} for i in data: for j in data: - try: - que[i,j]=data[i].corr(data[j]) - except: - pass + if i!=j: + try: + que[i,j]=data[i].corr(data[j]) + que[j,i]=que[i,j] + except: + pass + else: + break return que