#NEWLINE# def is_exp( var ) : #NEWLINE# #INDENT# '\n    Match a variable with either of the `exp(x)` or `-exp(x)` patterns.\n\n    Parameters\n    ----------\n    var\n        The Variable to analyze.\n\n    Returns\n    -------\n    tuple\n        A pair (b, x) with `b` a boolean set to True if `var` is of the\n        form `-exp(x)` and False if `var` is of the form `exp(x)`. If `var`\n        cannot be cast into either form, then return `None`.\n\n    ' #NEWLINE# neg = False #NEWLINE# neg_info = is_neg ( neg_info ) #NEWLINE# if ( neg_info is not None ) : #NEWLINE# #INDENT# neg = True #NEWLINE# var = neg_info #NEWLINE# #UNINDENT# if ( var . owner and ( var . owner . op == tensor . exp ) ) : #NEWLINE# #INDENT# return ( neg , var . owner . inputs [ 0 ] )