docstr: Check the results of locate_tensor_element on an ndarray representation.
  
  that represents a numpy.ndarray.
  
  Args:
    out: An instance of RichTextLines representing a numpy.ndarray.
    a: The numpy.ndarray being represented.
  
  Raises:
    ValueError: if any ellipses ("...") are found in the lines representing
      the array.
docstr_tok: ["Check","the","results","of","locate_tensor_element","on","an","ndarray","representation",".","that","represents","a","numpy.ndarray",".","Args",":","out",":","An","instance","of","RichTextLines","representing","a","numpy.ndarray",".","a",":","The","numpy.ndarray","being","represented",".","Raises",":","ValueError",":","if","any","ellipses","(","``","...","''",")","are","found","in","the","lines","representing","the","array","."]
code: def _checkTensorElementLocations(self, out, a):
      """Check the results of locate_tensor_element on an ndarray representation.
  
      that represents a numpy.ndarray.
  
      Args:
        out: An instance of RichTextLines representing a numpy.ndarray.
        a: The numpy.ndarray being represented.
  
      Raises:
        ValueError: if any ellipses ("...") are found in the lines representing
          the array.
      """
      # First, locate the beginning of the tensor value section.
      begin_line_num = 0
      while not out.lines[begin_line_num].startswith("array"):
          begin_line_num += 1
      # Second, find all matches to tensor-value regex.
      element_index = 0
      for line_num in range(begin_line_num, len(out.lines)):
          line = out.lines[line_num]
          if "..." in line:
              raise ValueError(
                  "Unexpected found ellipses in line representing array"
              )
          matches = re.finditer(self._ELEMENT_REGEX, line)
          for match in matches:
              subscripts = list(
                  np.unravel_index(element_index, a.shape)
              )
              (
                  is_omitted,
                  row,
                  start_col,
                  end_col,
              ) = tensor_format.locate_tensor_element(out, subscripts)
              self.assertFalse(is_omitted)
              self.assertEqual(line_num, row)
              self.assertEqual(match.start(), start_col)
              self.assertEqual(match.end(), end_col)
              element_index += 1
      self.assertEqual(element_index, np.size(a))
  
imports: import re
  import numpy
  from tensorflow.core.framework import tensor_pb2
  from tensorflow.core.framework import tensor_shape_pb2
  from tensorflow.core.framework import types_pb2
  from tensorflow.python.debug.cli import cli_test_utils
  from tensorflow.python.debug.cli import tensor_format
  from tensorflow.python.debug.lib import debug_data
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 4 for calling the RichTextLinesTest obj's underlying member method code with example usage: obj._checkTensorElementLocations(out, a) without return types