def ptp(a, axis=None):
 a = as_tensor_variable(a)
 out = (max(a, axis) - min(a, axis))
 return out

def ptp ( a , axis = None ) : a = as_tensor_variable ( a ) out = ( max ( a , axis ) - min ( a , axis ) ) return out
range of values along an axis .