def ptp(obj, axis=None, out=None, fill_value=None):
try:<EOL><INDENT>return obj.ptp(axis, out=out, fill_value=fill_value)<EOL><DEDENT>except (AttributeError, TypeError):<EOL><INDENT>return asanyarray(obj).ptp(axis=axis, fill_value=fill_value, out=out)<EOL><DEDENT>
a.ptp(axis=None) =  a.max(axis)-a.min(axis)