So, I've defined a _dedup_index for my custom index.
When I pass to it a pandas dataframe with just 1 row, the function max_pairs gets called, return 0, and then we get a division by zero on this line.
Since I see the deprecated tag on the docstring of max_pairs, I think this may be a bug...