parameters: (self, x)
return_statement: return array_ops.reshape(x, maybe_expanded_shape)
docstring: Ensures non-scalar input has at least one column.
  
      Example:
        If `x = [1, 2, 3]` then the output is `[[1], [2], [3]]`.
  
        If `x = [[1, 2, 3], [4, 5, 6]]` then the output is unchanged.
  
        If `x = 1` then the output is unchanged.
  
      Args:
        x: `Tensor`.
  
      Returns:
        columnar_x: `Tensor` with at least two dimensions.
docstring_summary: Ensures non-scalar input has at least one column.
docstring_tokens: Ensures non - scalar input has at least one column .
function: def _make_columnar(self, x):
      """Ensures non-scalar input has at least one column.
  
      Example:
        If `x = [1, 2, 3]` then the output is `[[1], [2], [3]]`.
  
        If `x = [[1, 2, 3], [4, 5, 6]]` then the output is unchanged.
  
        If `x = 1` then the output is unchanged.
  
      Args:
        x: `Tensor`.
  
      Returns:
        columnar_x: `Tensor` with at least two dimensions.
      """
      if x.get_shape().ndims is not None:
        if x.get_shape().ndims == 1:
          x = x[array_ops.newaxis, :]
        return x
      shape = array_ops.shape(x)
      maybe_expanded_shape = array_ops.concat([
          shape[:-1],
          distribution_util.pick_vector(
              math_ops.equal(array_ops.rank(x), 1),
              [1], np.array([], dtype=np.int32)),
          shape[-1:],
      ], 0)
      return array_ops.reshape(x, maybe_expanded_shape)
function_tokens: def _make_columnar ( self , x ) : if x . get_shape ( ) . ndims is not None : if x . get_shape ( ) . ndims == 1 : x = x [ array_ops . newaxis , : ] return x shape = array_ops . shape ( x ) maybe_expanded_shape = array_ops . concat ( [ shape [ : - 1 ] , distribution_util . pick_vector ( math_ops . equal ( array_ops . rank ( x ) , 1 ) , [ 1 ] , np . array ( [ ] , dtype = np . int32 ) ) , shape [ - 1 : ] , ] , 0 ) return array_ops . reshape ( x , maybe_expanded_shape )