def xyz_to_zyx(data, x=0, y=0, z=0):
    """
     Reverses dimensions of matrix.

     Assumes data is not flattened. If it is flattened, pass in y, x, z parameters
     :param data:
     :param y:
     :param x:
     :param z:
    """

    x = data.shape[0] if x == 0 else x
    y = data.shape[1] if y == 0 else y
    z = data.shape[2] if z == 0 else z

    trans = data.swapaxes(0, 2)

    return trans