def test_compute_floor_offsets_with_indices_onlysource(self):

    def graph_fn():
        y_source = tf.constant([1.5, 0.3], dtype=tf.float32)
        x_source = tf.constant([2.5, 4.2], dtype=tf.float32)
        (offsets, indices) = ta_utils.compute_floor_offsets_with_indices(y_source, x_source)
        return (offsets, indices)
    (offsets, indices) = self.execute(graph_fn, [])
    np.testing.assert_array_almost_equal(offsets, np.array([[0.5, 0.5], [0.3, 0.2]]))
    np.testing.assert_array_almost_equal(indices, np.array([[1, 2], [0, 4]]))
def test_compute_floor_offsets_with_indices_onlysource(self):

    def graph_fn():
        y_source = tf.constant([1.5, 0.3], dtype=tf.float32)
        x_source = tf.constant([2.5, 4.2], dtype=tf.float32)
        (offsets, indices) = ta_utils.compute_floor_offsets_with_indices(y_source, x_source)
        return (offsets, indices)
    (offsets, indices) = self.execute(graph_fn, [])
    np.testing.assert_array_almost_equal(offsets, np.array([[0.5, 0.5], [0.3, 0.2]]))
    np.testing.assert_array_almost_equal(indices, np.array([[1, 2], [0, 4]]))