From: Travis O. <oli...@ee...> - 2006-10-11 21:02:51
|
Sven Schreiber wrote: >>This is user adjustable. You change the error mode to raise on >>'invalid' instead of pass silently which is now the default. >> >>-Travis >> >> >> > >Could you please explain how this adjustment is done, or point to the >relevant documentation. > > numpy.sqrt(-1) old = seterr(invalid='raise') numpy.sqrt(-1) # should raise an error seterr(**old) # restores error-modes for current thread numpy.sqrt(-1) |