Re: [Numpy-discussion] A context manager for print options

2013-10-27 Thread Matthew Brett
Hi, On Sun, Oct 27, 2013 at 2:01 AM, Neil Girdhar wrote: > Why not replace get_printoptions/set_printoptions with a context manager > accessed using numpy.printoptions in the same way that numpy.errstate > exposes a context manager to seterr/geterr? This would make the set method > redundant. >

Re: [Numpy-discussion] A context manager for print options

2013-10-27 Thread Nathaniel Smith
On 27 Oct 2013 09:02, "Neil Girdhar" wrote: > > Why not replace get_printoptions/set_printoptions with a context manager accessed using numpy.printoptions in the same way that numpy.errstate exposes a context manager to seterr/geterr? This would make the set method redundant. > > Also, the contex

[Numpy-discussion] A context manager for print options

2013-10-27 Thread Neil Girdhar
Why not replace get_printoptions/set_printoptions with a context manager accessed using numpy.printoptions in the same way that numpy.errstate exposes a context manager to seterr/geterr? This would make the set method redundant. Also, the context manager returned by numpy.errstate, numpy.printopt