class_docstr: Tests the correctness of the Y = inv(tril) transformation.
class_docstr_tok: ["Tests","the","correctness","of","the","Y","=","inv","(","tril",")","transformation","."]
code: def _inv(self, x):
      y = np.linalg.inv(x)
      # Since triu_indices only works on 2d arrays we need to iterate over all the
      # 2d arrays in a x-dimensional array.
      for idx in np.ndindex(y.shape[0:-2]):
          y[idx][np.triu_indices(y[idx].shape[-1], 1)] = 0
      return y
  
file_path: probability/tensorflow_probability/python/bijectors/matrix_inverse_tril_test.py
imports: import numpy
  from tensorflow_probability.python.bijectors import bijector_test_util
  from tensorflow_probability.python.bijectors import fill_triangular
  from tensorflow_probability.python.bijectors import invert
  from tensorflow_probability.python.bijectors import matrix_inverse_tril
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 1 for calling the MatrixInverseTriLBijectorTest obj's underlying member method code with example usage: obj._inv(x) and returns: y