original_docstring: 
          given to tensors and an axis for comparison, pad the smaller of the two with zeros to match the dimensions of the larger
          
docstring: given to tensors and an axis for comparison, pad the smaller of the two with zeros to match the dimensions of the larger
docstring_tokens: given to tensors and an axis for comparison pad the smaller of the two with zeros to match the dimensions of the larger
code: def _pad_to_match_dimensions(a, b, axis, pad_left=False):
          '''
          given to tensors and an axis for comparison, pad the smaller of the two with zeros to match the dimensions of the larger
          '''
  
          # get function to pad correct side
          if pad_left:
              concat = lambda X, _pad_shape, _axis: np.concatenate((np.zeros(tuple(_pad_shape)), X), axis=_axis)
          else:
              concat = lambda X, _pad_shape, _axis: np.concatenate((X, np.zeros(tuple(_pad_shape))), axis=_axis)
  
          a_axis = a.shape[axis]
          b_axis = b.shape[axis]
          if a_axis > b_axis:
              pad_shape = list(b.shape)
              pad_shape[axis] = a_axis - b_axis
              b = concat(b, pad_shape, axis)
          if b_axis > a_axis:
              pad_shape = list(a.shape)
              pad_shape[axis] = b_axis - a_axis
              a = concat(a, pad_shape, axis)
  
          return a, b
code_tokens: def _pad_to_match_dimensions ( a , b , axis , pad_left = False ) : if pad_left : concat = lambda X , _pad_shape , _axis : np . concatenate ( ( np . zeros ( tuple ( _pad_shape ) ) , X ) , axis = _axis ) else : concat = lambda X , _pad_shape , _axis : np . concatenate ( ( X , np . zeros ( tuple ( _pad_shape ) ) ) , axis = _axis ) a_axis = a . shape [ axis ] b_axis = b . shape [ axis ] if a_axis > b_axis : pad_shape = list ( b . shape ) pad_shape [ axis ] = a_axis - b_axis b = concat ( b , pad_shape , axis ) if b_axis > a_axis : pad_shape = list ( a . shape ) pad_shape [ axis ] = b_axis - a_axis a = concat ( a , pad_shape , axis ) return a , b
short_docstring: given to tensors and an axis for comparison, pad the smaller of the two with zeros to match the dimensions of the larger
short_docstring_tokens: given to tensors and an axis for comparison pad the smaller of the two with zeros to match the dimensions of the larger
comment: '''
          given to tensors and an axis for comparison, pad the smaller of the two with zeros to match the dimensions of the larger
          '''$SEP$# get function to pad correct side