parameters: (self)
docstring: Returns the total number of elements, or none for incomplete shapes.
docstring_summary: Returns the total number of elements, or none for incomplete shapes.
docstring_tokens: Returns the total number of elements or none for incomplete shapes .
function: def num_elements(self):
      """Returns the total number of elements, or none for incomplete shapes."""
      if self.is_fully_defined():
        size = 1
        for dim in self._dims:
          size *= dim.value
        return size
      else:
        return None
function_tokens: def num_elements ( self ) : if self . is_fully_defined ( ) : size = 1 for dim in self . _dims : size *= dim . value return size else : return None