Skip to content

Commit 73fb978

Browse files
committed
compare lengths
1 parent 4d7de9c commit 73fb978

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sdmetrics/single_column/statistical/regex_format_adherence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def compute(cls, real_data, synthetic_data, regex_format):
9292
cls._validate_regex_format(regex_format)
9393

9494
real_valid, real_groups = cls._validate_regex_column(real_data, regex_format)
95-
if real_valid.sum() == 0:
95+
if len(real_valid) != len(real_data):
9696
LOGGER.warning('The real data does not match the given regex format.')
9797

9898
synthetic_valid, _ = cls._validate_regex_column(synthetic_data, regex_format, real_groups)

0 commit comments

Comments
 (0)