def chop(x, rtol=default_rtol, atol=default_atol, copy=True):
return replace_close(x, np.round(x), rtol=rtol, atol=atol, copy=copy)<EOL>
chop(x) yields x if x is not close to round(x) and round(x) otherwise. Closeness is determined
  by numpy's isclose(), and the atol and rtol options are passed along.

The x and xhat arguments may be lists/arrays.

The optional argument copy may also be set to False to chop x in-place.