code: def testNotInvertibleCpu(self):
      # Non-invertible inputs result in lower-triangular NaNs.
      x = constant_op.constant(
          [[1.0, -1.0, 0.0], [-1.0, 1.0, -1.0], [0.0, -1.0, 1.0]]
      )
      chol = linalg_ops.cholesky(x)
      # Extract the lower-triangular elements.
      lower_mask = array_ops.matrix_band_part(
          constant_op.constant(True, shape=x.shape), -1, 0
      )
      chol_lower = array_ops.boolean_mask(chol, lower_mask)
      # Assert all NaN.
      all_nan = self.evaluate(
          math_ops.reduce_all(
              math_ops.reduce_all(math_ops.is_nan(chol_lower))
          )
      )
      self.assertTrue(all_nan)
  
imports: import numpy
  from tensorflow.python.client import session
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import gradient_checker_v2
  from tensorflow.python.ops import linalg_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import stateless_random_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.ops.linalg import linalg
  from tensorflow.python.platform import benchmark
  from tensorflow.python.platform import test
label_desc: Use image node_id 7 for calling the CholeskyOpTest obj's underlying member method code with example usage: obj.testNotInvertibleCpu() without return types