class_docstr: Transforms vectors to triangular.
  
  Triangular matrix elements are filled in a clockwise spiral.
  
  Given input with shape `batch_shape + [d]`, produces output with
  shape `batch_shape + [n, n]`, where
   `n = (-1 + sqrt(1 + 8 * d))/2`.
  This follows by solving the quadratic equation
   `d = 1 + 2 + ... + n = n * (n + 1)/2`.
  
  #### Example
  
  ```python
  b = tfb.FillTriangular(upper=False)
  b.forward([1, 2, 3, 4, 5, 6])
  # ==> [[4, 0, 0],
  #      [6, 5, 0],
  #      [3, 2, 1]]
  
  b = tfb.FillTriangular(upper=True)
  b.forward([1, 2, 3, 4, 5, 6])
  # ==> [[1, 2, 3],
  #      [0, 5, 6],
  #      [0, 0, 4]]
  
  ```
class_docstr_tok: ["Transforms","vectors","to","triangular",".","Triangular","matrix","elements","are","filled","in","a","clockwise","spiral",".","Given","input","with","shape","`","batch_shape","+","[","d","]","`",",","produces","output","with","shape","`","batch_shape","+","[","n",",","n","]","`",",","where","`","n","=","(","-1","+","sqrt","(","1","+","8","*","d",")",")","\/2","`",".","This","follows","by","solving","the","quadratic","equation","`","d","=","1","+","2","+","...","+","n","=","n","*","(","n","+","1",")","\/2","`",".","#","#","#","#","Example","``","`","python","b","=","tfb.FillTriangular","(","upper=False",")","b.forward","(","[","1",",","2",",","3",",","4",",","5",",","6","]",")","#","==",">","[","[","4",",","0",",","0","]",",","#","[","6",",","5",",","0","]",",","#","[","3",",","2",",","1","]","]","b","=","tfb.FillTriangular","(","upper=True",")","b.forward","(","[","1",",","2",",","3",",","4",",","5",",","6","]",")","#","==",">","[","[","1",",","2",",","3","]",",","#","[","0",",","5",",","6","]",",","#","[","0",",","0",",","4","]","]","``","`"]
docstr: Instantiates the `FillTriangular` bijector.
  
  Args:
    upper: Python `bool` representing whether output matrix should be upper
      triangular (`True`) or lower triangular (`False`, default).
    validate_args: Python `bool` indicating whether arguments should be
      checked for correctness.
    name: Python `str` name given to ops managed by this object.
docstr_tok: ["Instantiates","the","`","FillTriangular","`","bijector",".","Args",":","upper",":","Python","`","bool","`","representing","whether","output","matrix","should","be","upper","triangular","(","`","True","`",")","or","lower","triangular","(","`","False","`",",","default",")",".","validate_args",":","Python","`","bool","`","indicating","whether","arguments","should","be","checked","for","correctness",".","name",":","Python","`","str","`","name","given","to","ops","managed","by","this","object","."]
code: def __init__(
      self, upper=False, validate_args=False, name="fill_triangular"
  ):
      """Instantiates the `FillTriangular` bijector.
  
      Args:
        upper: Python `bool` representing whether output matrix should be upper
          triangular (`True`) or lower triangular (`False`, default).
        validate_args: Python `bool` indicating whether arguments should be
          checked for correctness.
        name: Python `str` name given to ops managed by this object.
      """
      parameters = dict(locals())
      with tf.name_scope(name) as name:
          self._upper = upper
          super(FillTriangular, self).__init__(
              forward_min_event_ndims=1,
              inverse_min_event_ndims=2,
              is_constant_jacobian=True,
              validate_args=validate_args,
              parameters=parameters,
              name=name,
          )
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.math.linalg import fill_triangular
  from tensorflow_probability.python.math.linalg import fill_triangular_inverse
label_desc: Use image node_id 1 to create a new FillTriangular object from inherited base classes: bijector with example: obj = FillTriangular(upper, validate_args, name)