import pickle


def read_x_y_z_fromfile(filename):
    """read x y z from file: filename

    :param filename: The file which we want to read from
    :returns: three arrays: x, y, z
    :rtype: numpy.arrays

    """
    try:
        read_file = open(filename, 'rb')
    except IOError:
        print("cannot open this file")
        return False
    else:
        var = pickle.load(read_file)
        read_file.close()
        return var