def split(dataset, attribute, value):
    """
    Split a dataset in two by value of an attribute

    Parameters
    ----------
    dataset    : dataset for the split
    attribute  : attribute to split on     
    value      : threshold value for the split

    Returns
    -------
    a tuple containing the two splits   
    """
    set_one = dataset[dataset[:, attribute] > value]
    set_two = dataset[dataset[:, attribute] <= value]
    return (set_one, set_two)