import pickle


def read_file(filename):
    """Read a pickle file.
    
    Args:
        filename (str): Name of the file.
    
    Returns:
        np.array or dict: Data to read.
    
    Examples:
        >>> read_file('share/data.pk')
        array([1., 1., 1., 1., 1.])

    """
    data = pickle.load(open(filename, "rb"))
    return data