import pickle


def pklread(fname):
    """
    Opens a pickled file with name fname.

    Returns data array stored in pickled file.
    """
    pklffile = open(fname,"rb")
    dat = pickle.load(pklffile)
    pklffile.close()
    return dat