code: def testNotInvertible(self):
      # The input should be invertible.
      # The matrix is singular because it has a zero on the diagonal.
      singular_matrix = np.array(
          [
              [[1.0, 0.0, 0.0], [-1.0, 0.0, 0.0], [0.0, -1.0, 1.0]],
              [[1.0, 0.0, 0.0], [-1.0, 1.0, 0.0], [0.0, -1.0, 0.0]],
              [[1.0, 0.0, 0.0], [-1.0, 1.0, 0.0], [0.0, -1.0, 1.0]],
          ]
      )
      rhs = np.array([[3.0], [5.0], [1.0]])
  
      expected = np.array(
          [
              [[3.0], [np.inf], [np.inf]],
              [[3.0], [8.0], [np.inf]],
              [[3.0], [8.0], [9.0]],
          ]
      )
  
      with self.cached_session(use_gpu=False):
          ans = linalg_ops.matrix_triangular_solve(singular_matrix, rhs)
          self.assertAllClose(self.evaluate(ans), expected)
  
imports: import numpy
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import linalg_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 13 for calling the MatrixTriangularSolveOpTest obj's underlying member method code with example usage: obj.testNotInvertible() without return types