Skip to content

Commit

Permalink
connectivity assert col_names == row_names (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmetNSimsek committed Apr 20, 2023
1 parent cec273e commit 3800f78
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions siibra/features/connectivity/regional_connectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ def _array_to_dataframe(self, array: np.ndarray) -> pd.DataFrame:
for label, region in indexmap.items()
}
df = df.rename(index=remapper).rename(columns=remapper)
assert all(df.index[i] == r for i, r in enumerate(df.columns))
except:
raise RuntimeError("Could not decode connectivity matrix regions.")
return df
Expand Down

0 comments on commit 3800f78

Please sign in to comment.