Skip to content

Commit

Permalink
add: add extra assert statement to get_residuals
Browse files Browse the repository at this point in the history
  • Loading branch information
c-tomlin committed Aug 24, 2023
1 parent 07d564b commit 3e51118
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pes_match/matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,11 @@ def get_residuals(all_records, matched_records, id_column):
0 4
1 5
"""

assert (
matched_records[id_column].dtype == all_records[id_column].dtype
), "id_column types do not match between matched_records and all_records"

df = all_records.merge(
matched_records[[id_column]].drop_duplicates(),
on=id_column,
Expand Down

0 comments on commit 3e51118

Please sign in to comment.