class_docstr: Test for tfp.math.interp_regular_1d_grid.
class_docstr_tok: ["Test","for","tfp.math.interp_regular_1d_grid","."]
code: def test_unknown_shape(self):
      # Showed up in a user problem.
      if tf.executing_eagerly():
          self.skipTest("Graph-mode only")
  
      x = tf1.placeholder_with_default(tf.zeros((2,)), shape=[None])
  
      # Used to result in (None, None) shape, should be (None, 1).
      y_ref = tf1.placeholder_with_default(
          tf.zeros((2, 1)), shape=[None, 1]
      )
      y = interpolation.interp_regular_1d_grid(
          x=x, x_ref_min=-1.0, x_ref_max=1.0, y_ref=y_ref, axis=0
      )
      self.assertEqual([None, 1], y.shape)
  
      y_ref = tf1.placeholder_with_default(
          tf.zeros((2, 2)), shape=[None, 2]
      )
      y = interpolation.interp_regular_1d_grid(
          x=x, x_ref_min=-1.0, x_ref_max=1.0, y_ref=y_ref, axis=0
      )
      self.assertEqual([None, 2], y.shape)
  
imports: import numpy
  from scipy import interpolate
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
  from tensorflow_probability.python.math import interpolation
label_desc: Use image node_id 16 for calling the InterpRegular1DGridTest obj's underlying member method code with example usage: obj.test_unknown_shape() without return types