# Path: recordlinkage/utils.py
# def get_length(x):
#     """Return int or len(x)"""
# 
#     try:
#         return int(x)
#     except Exception:
#         return len(x)


import numpy
import pandas
from recordlinkage.utils import get_length

    Deduplication: Given a DataFrame A with length N, the full index size is
    N*(N-1)/2. Linking: Given a DataFrame A with length N and a DataFrame B
    with length M, the full index size is N*M.

    Parameters
    ----------
    *args: int, pandas.MultiIndex, pandas.Series, pandas.DataFrame
        A pandas object or a int representing the length of a dataset to link.
        When there is one argument, it is assumed that the record linkage is
        a deduplication process.

    Examples
    --------

    Use integers:
    >>> full_index_size(10)  # deduplication: 45 pairs
    >>> full_index_size(10, 10)  # linking: 100 pairs

    or pandas objects
    >>> full_index_size(DF)  # deduplication: len(DF)*(len(DF)-1)/2 pairs
    >>> full_index_size(DF, DF)  # linking: len(DF)*len(DF) pairs

    """

    # check if a list or tuple is passed as argument
    if len(args) == 1 and isinstance(args[0], (list, tuple)):
        args = tuple(args[0])

    if len(args) == 1:

# Path: recordlinkage/utils.py
# def get_length(x):
#     """Return int or len(x)"""
# 
#     try:
#         return int(x)
#     except Exception:
#         return len(x)


# Path: recordlinkage/measures.py
import numpy
import pandas
from recordlinkage.utils import get_length


    Deduplication: Given a DataFrame A with length N, the full index size is
    N*(N-1)/2. Linking: Given a DataFrame A with length N and a DataFrame B
    with length M, the full index size is N*M.

    Parameters
    ----------
    *args: int, pandas.MultiIndex, pandas.Series, pandas.DataFrame
        A pandas object or a int representing the length of a dataset to link.
        When there is one argument, it is assumed that the record linkage is
        a deduplication process.

    Examples
    --------

    Use integers:
    >>> full_index_size(10)  # deduplication: 45 pairs
    >>> full_index_size(10, 10)  # linking: 100 pairs

    or pandas objects
    >>> full_index_size(DF)  # deduplication: len(DF)*(len(DF)-1)/2 pairs
    >>> full_index_size(DF, DF)  # linking: len(DF)*len(DF) pairs

    """

    # check if a list or tuple is passed as argument
    if len(args) == 1 and isinstance(args[0], (list, tuple)):
        args = tuple(args[0])

    if len(args) == 1:

        n = get_length(args[0])