class_docstr: Abstract class for interpolation problem descriptions.
class_docstr_tok: ["Abstract","class","for","interpolation","problem","descriptions","."]
docstr: Make data for an interpolation problem where all x vectors are n-d.
  
  Args:
      optimizable: If True, then make train_points a tf.Variable.
      extrapolate: If False, then clamp the query_points values to be
          within the max and min of train_points.
      dtype: The data type to use.
  
  Returns:
      query_points, query_values, train_points, train_values: training
          and test tensors for interpolation problem.
docstr_tok: ["Make","data","for","an","interpolation","problem","where","all","x","vectors","are","n-d.","Args",":","optimizable",":","If","True",",","then","make","train_points","a","tf.Variable",".","extrapolate",":","If","False",",","then","clamp","the","query_points","values","to","be","within","the","max","and","min","of","train_points",".","dtype",":","The","data","type","to","use",".","Returns",":","query_points",",","query_values",",","train_points",",","train_values",":","training","and","test","tensors","for","interpolation","problem","."]
code: def get_problem(
      self, optimizable=False, extrapolate=True, dtype="float32"
  ):
      """Make data for an interpolation problem where all x vectors are n-d.
  
      Args:
          optimizable: If True, then make train_points a tf.Variable.
          extrapolate: If False, then clamp the query_points values to be
              within the max and min of train_points.
          dtype: The data type to use.
  
      Returns:
          query_points, query_values, train_points, train_values: training
              and test tensors for interpolation problem.
      """
  
      # The values generated here depend on a seed of 0.
      np.random.seed(0)
  
      batch_size = 1
      num_training_points = 10
      num_query_points = 4
  
      init_points = np.random.uniform(
          size=[batch_size, num_training_points, self.DATA_DIM]
      )
  
      init_points = init_points.astype(dtype)
      train_points = (
          tf.Variable(init_points)
          if optimizable
          else tf.constant(init_points)
      )
      train_values = self.test_function(train_points)
  
      query_points_np = np.random.uniform(
          size=[batch_size, num_query_points, self.DATA_DIM]
      )
      query_points_np = query_points_np.astype(dtype)
      if not extrapolate:
          query_points_np = np.clip(
              query_points_np, np.min(init_points), np.max(init_points)
          )
  
      query_points = tf.constant(query_points_np)
      query_values = self.test_function(query_points_np)
  
      return query_points, query_values, train_points, train_values
  
file_path: addons/tensorflow_addons/image/tests/interpolate_spline_test.py
imports: import numpy
  import pytest
  from scipy import interpolate
  import tensorflow
  from tensorflow_addons.image import interpolate_spline
label_desc: Use image node_id 1 for calling the _InterpolationProblem obj's underlying member method code with example usage: obj.get_problem(optimizable, extrapolate, dtype) and returns: query_points,  query_values,  train_points,  train_values