parameters: (self, other)
return_statement: return True
docstring: Returns True iff `self` is compatible with `other`.
  
      Two possibly-partially-defined shapes are compatible if there
      exists a fully-defined shape that both shapes can represent. Thus,
      compatibility allows the shape inference code to reason about
      partially-defined shapes. For example:
  
      * TensorShape(None) is compatible with all shapes.
  
      * TensorShape([None, None]) is compatible with all two-dimensional
        shapes, such as TensorShape([32, 784]), and also TensorShape(None). It is
        not compatible with, for example, TensorShape([None]) or
        TensorShape([None, None, None]).
  
      * TensorShape([32, None]) is compatible with all two-dimensional shapes
        with size 32 in the 0th dimension, and also TensorShape([None, None])
        and TensorShape(None). It is not compatible with, for example,
        TensorShape([32]), TensorShape([32, None, 1]) or TensorShape([64, None]).
  
      * TensorShape([32, 784]) is compatible with itself, and also
        TensorShape([32, None]), TensorShape([None, 784]), TensorShape([None,
        None]) and TensorShape(None). It is not compatible with, for example,
        TensorShape([32, 1, 784]) or TensorShape([None]).
  
      The compatibility relation is reflexive and symmetric, but not
      transitive. For example, TensorShape([32, 784]) is compatible with
      TensorShape(None), and TensorShape(None) is compatible with
      TensorShape([4, 4]), but TensorShape([32, 784]) is not compatible with
      TensorShape([4, 4]).
  
      Args:
        other: Another TensorShape.
  
      Returns:
        True iff `self` is compatible with `other`.
docstring_summary: Returns True iff `self` is compatible with `other`.
docstring_tokens: Returns True iff self is compatible with other .
function: def is_compatible_with(self, other):
      """Returns True iff `self` is compatible with `other`.
  
      Two possibly-partially-defined shapes are compatible if there
      exists a fully-defined shape that both shapes can represent. Thus,
      compatibility allows the shape inference code to reason about
      partially-defined shapes. For example:
  
      * TensorShape(None) is compatible with all shapes.
  
      * TensorShape([None, None]) is compatible with all two-dimensional
        shapes, such as TensorShape([32, 784]), and also TensorShape(None). It is
        not compatible with, for example, TensorShape([None]) or
        TensorShape([None, None, None]).
  
      * TensorShape([32, None]) is compatible with all two-dimensional shapes
        with size 32 in the 0th dimension, and also TensorShape([None, None])
        and TensorShape(None). It is not compatible with, for example,
        TensorShape([32]), TensorShape([32, None, 1]) or TensorShape([64, None]).
  
      * TensorShape([32, 784]) is compatible with itself, and also
        TensorShape([32, None]), TensorShape([None, 784]), TensorShape([None,
        None]) and TensorShape(None). It is not compatible with, for example,
        TensorShape([32, 1, 784]) or TensorShape([None]).
  
      The compatibility relation is reflexive and symmetric, but not
      transitive. For example, TensorShape([32, 784]) is compatible with
      TensorShape(None), and TensorShape(None) is compatible with
      TensorShape([4, 4]), but TensorShape([32, 784]) is not compatible with
      TensorShape([4, 4]).
  
      Args:
        other: Another TensorShape.
  
      Returns:
        True iff `self` is compatible with `other`.
  
      """
      other = as_shape(other)
      if self._dims is not None and other.dims is not None:
        if self.ndims != other.ndims:
          return False
        for x_dim, y_dim in zip(self._dims, other.dims):
          if not x_dim.is_compatible_with(y_dim):
            return False
      return True
function_tokens: def is_compatible_with ( self , other ) : other = as_shape ( other ) if self . _dims is not None and other . dims is not None : if self . ndims != other . ndims : return False for x_dim , y_dim in zip ( self . _dims , other . dims ) : if not x_dim . is_compatible_with ( y_dim ) : return False return True