@contextmanager<EOL>def float_error_ignore():
oldsettings=np.seterr(divide='<STR_LIT:ignore>',under='<STR_LIT:ignore>')<EOL>yield<EOL>np.seterr(**oldsettings)<EOL>
Many of the functions in this module use Gaussian smoothing, which
is based on a calculation like exp(divide(x*x,sigma)).  When sigma
is zero the value of this expression should be zero at all points
in the plane, because such a Gaussian is infinitely small.
Obtaining the correct answer using finite-precision floating-point
array computations requires allowing infinite values to be
returned from divide(), and allowing exp() to underflow silently
to zero when given an infinite value.  In numpy this is achieved
by using its seterr() function to disable divide-by-zero and
underflow warnings temporarily while these values are being
computed.