def transform_matrix_offset_center(matrix, x, y):
    o_x = 2 / float(x) + 0.5
    o_y = float(y) / 2 + 0.5
    offset_matrix = np.array([[1, 0, o_x], [0, 1, o_y], [0, 0, 1]])
    reset_matrix = np.array([[1, 0, -o_x], [0, 1, -o_y], [0, 0, 1]])
    transform_matrix = np.dot(np.dot(offset_matrix, matrix), reset_matrix)
    return transform_matrix
dataset/ETHPy150Open fchollet/keras/keras/preprocessing/image.py/transform_matrix_offset_center/swapped operands of `/`