def test_tf_linear_interp1d_map(self):
    'Tests TF linear interpolation mapping to a single number.'

    def graph_fn():
        tf_x = tf.constant([0.0, 0.5, 1.0])
        tf_y = tf.constant([0.5, 0.5, 0.5])
        new_x = tf.constant([0.0, 0.25, 0.5, 0.75, 1.0])
        tf_map_outputs = calibration_builder._tf_linear_interp1d(new_x, tf_x, tf_y)
        return tf_map_outputs
    tf_map_outputs_np = self.execute(graph_fn, [])
    self.assertAllClose(tf_map_outputs_np, [0.5, 0.5, 0.5, 0.5, 0.5])
Tests TF linear interpolation mapping to a single number.
def test_tf_linear_interp1d_map(self):
    

    def graph_fn():
        tf_x = tf.constant([0.0, 0.5, 1.0])
        tf_y = tf.constant([0.5, 0.5, 0.5])
        new_x = tf.constant([0.0, 0.25, 0.5, 0.75, 1.0])
        tf_map_outputs = calibration_builder._tf_linear_interp1d(new_x, tf_x, tf_y)
        return tf_map_outputs
    tf_map_outputs_np = self.execute(graph_fn, [])
    self.assertAllClose(tf_map_outputs_np, [0.5, 0.5, 0.5, 0.5, 0.5])