Save a dataset using caller's name.

    :param data: a list or numpy array containing the data
    :param suffix: optional suffix to add to name
    :param dirname: optional directory name

def save_data(data, suffix='', dirname=None):
    """Save a dataset using caller's name.

    :param data: a list or numpy array containing the data
    :param suffix: optional suffix to add to name
    :param dirname: optional directory name

    """
    if type(data) == list:
        data = np.array(data).T

    name = create_graph_name(suffix, dirname) + '.txt'
    np.savetxt(name, data)