Skip to content

Commit

Permalink
Fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
fealho committed Nov 25, 2024
1 parent 9599f95 commit a4ffbc5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sdmetrics/column_pairs/statistical/inter_row_msas.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ def _validate_inputs(real_data, synthetic_data, n_rows_diff, apply_log):
@staticmethod
def _apply_log(real_values, synthetic_values, apply_log):
if apply_log:
if pd.api.types.is_datetime64_any_dtype(
real_values
) or pd.api.types.is_datetime64_any_dtype(synthetic_values):
raise TypeError(
'Cannot compute log for datetime columns. '
"Please set 'apply_log' to False to use this metric."
)

num_invalid = sum(x <= 0 for x in pd.concat((real_values, synthetic_values)))
if num_invalid:
warnings.warn(
Expand Down

0 comments on commit a4ffbc5

Please sign in to comment.