docstr: Convert a numpy array to a TF placeholder.
  
  Args:
    ndarray: any object convertible to a numpy array via `np.asarray()`.
  
  Returns:
    placeholder: a TensorFlow `placeholder` with default value given by the
    provided `ndarray`, dtype given by `self.dtype`, and shape specified
    statically only if `self.use_static_shape` is `True`.
docstr_tok: ["Convert","a","numpy","array","to","a","TF","placeholder",".","Args",":","ndarray",":","any","object","convertible","to","a","numpy","array","via","`","np.asarray","(",")","`",".","Returns",":","placeholder",":","a","TensorFlow","`","placeholder","`","with","default","value","given","by","the","provided","`","ndarray","`",",","dtype","given","by","`","self.dtype","`",",","and","shape","specified","statically","only","if","`","self.use_static_shape","`","is","`","True","`","."]
code: def _build_placeholder(self, ndarray):
      """Convert a numpy array to a TF placeholder.
  
      Args:
        ndarray: any object convertible to a numpy array via `np.asarray()`.
  
      Returns:
        placeholder: a TensorFlow `placeholder` with default value given by the
        provided `ndarray`, dtype given by `self.dtype`, and shape specified
        statically only if `self.use_static_shape` is `True`.
      """
  
      ndarray = np.asarray(ndarray).astype(self.dtype)
      return tf1.placeholder_with_default(
          ndarray,
          shape=ndarray.shape if self.use_static_shape else None,
      )
  
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import cauchy
  from tensorflow_probability.python.distributions import exponential
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import lognormal
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.sts.components.regression import LinearRegression
  from tensorflow_probability.python.sts.components.regression import SparseLinearRegression
  from tensorflow_probability.python.sts.components.sum import Sum
label_desc: Use image node_id 4 for calling the _LinearRegressionTest obj's underlying member method code with example usage: obj._build_placeholder(ndarray) and returns: tf1