parameters: (x, i)
return_statement: return result
docstring: Wrapper for gather that implicitly broadcasts unit dimensions.
docstring_summary: Wrapper for gather that implicitly broadcasts unit dimensions.
docstring_tokens: Wrapper for gather that implicitly broadcasts unit dimensions .
function: def _broadcasting_gather(x, i):
    """Wrapper for gather that implicitly broadcasts unit dimensions."""
    static_first_dim = tensor_shape.dimension_value(x.shape[0])
    if static_first_dim == 1:
      i = 0
    elif static_first_dim is None:
      i = array_ops.where_v2(array_ops.shape(x)[0] > 1, i, 0)
    result = array_ops.gather(x, i)
    return result
function_tokens: def _broadcasting_gather ( x , i ) : static_first_dim = tensor_shape . dimension_value ( x . shape [ 0 ] ) if static_first_dim == 1 : i = 0 elif static_first_dim is None : i = array_ops . where_v2 ( array_ops . shape ( x ) [ 0 ] > 1 , i , 0 ) result = array_ops . gather ( x , i ) return result