class_docstr: Represents the value of one dimension in a TensorShape.
class_docstr_tok: ["Represents","the","value","of","one","dimension","in","a","TensorShape","."]
docstr: Returns a Dimension that combines the information in `self` and
  `other`.
  
  Dimensions are combined as follows:
  
  ```python
  tf.Dimension(n)   .merge_with(tf.Dimension(n))    == tf.Dimension(n)
  tf.Dimension(n)   .merge_with(tf.Dimension(None)) == tf.Dimension(n)
  tf.Dimension(None).merge_with(tf.Dimension(n))    == tf.Dimension(n)
  tf.Dimension(None).merge_with(tf.Dimension(None)) == tf.Dimension(None)
  tf.Dimension(n)   .merge_with(tf.Dimension(m))  # raises ValueError for n != m
  ```
  
  Args:
    other: Another Dimension.
  
  Returns:
    A Dimension containing the combined information of `self` and
    `other`.
  
  Raises:
    ValueError: If `self` and `other` are not convertible (see
      is_convertible_with).
docstr_tok: ["Returns","a","Dimension","that","combines","the","information","in","`","self","`","and","`","other","`",".","Dimensions","are","combined","as","follows",":","``","`","python","tf.Dimension","(","n",")",".merge_with","(","tf.Dimension","(","n",")",")","==","tf.Dimension","(","n",")","tf.Dimension","(","n",")",".merge_with","(","tf.Dimension","(","None",")",")","==","tf.Dimension","(","n",")","tf.Dimension","(","None",")",".merge_with","(","tf.Dimension","(","n",")",")","==","tf.Dimension","(","n",")","tf.Dimension","(","None",")",".merge_with","(","tf.Dimension","(","None",")",")","==","tf.Dimension","(","None",")","tf.Dimension","(","n",")",".merge_with","(","tf.Dimension","(","m",")",")","#","raises","ValueError","for","n","!","=","m","``","`","Args",":","other",":","Another","Dimension",".","Returns",":","A","Dimension","containing","the","combined","information","of","`","self","`","and","`","other","`",".","Raises",":","ValueError",":","If","`","self","`","and","`","other","`","are","not","convertible","(","see","is_convertible_with",")","."]
code: def merge_with(self, other):
      """Returns a Dimension that combines the information in `self` and
      `other`.
  
      Dimensions are combined as follows:
  
      ```python
      tf.Dimension(n)   .merge_with(tf.Dimension(n))    == tf.Dimension(n)
      tf.Dimension(n)   .merge_with(tf.Dimension(None)) == tf.Dimension(n)
      tf.Dimension(None).merge_with(tf.Dimension(n))    == tf.Dimension(n)
      tf.Dimension(None).merge_with(tf.Dimension(None)) == tf.Dimension(None)
      tf.Dimension(n)   .merge_with(tf.Dimension(m))  # raises ValueError for n != m
      ```
  
      Args:
        other: Another Dimension.
  
      Returns:
        A Dimension containing the combined information of `self` and
        `other`.
  
      Raises:
        ValueError: If `self` and `other` are not convertible (see
          is_convertible_with).
      """
      other = as_dimension(other)
      self.assert_is_convertible_with(other)
      if self._value is None:
          return Dimension(other.value)
      else:
          return Dimension(self._value)
  
imports: from .None import compat, dtypes
  from tensorboard.compat.proto import tensor_shape_pb2
label_desc: Use image node_id 12 for calling the Dimension obj's underlying member method code with example usage: obj.merge_with(other) and returns: Dimension, Dimension