Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Add option to format float point output #190
Currently it is not possible to format how many digits of precision one wants to have in the output of IPython. For example, typing 1.0/3 returns 0.33333333333333331. In Octave, the same computation returns: ans = 0.33333. The set_printoptions function partially solves this:
In : set_printoptions(precision=4)
However, it doesn't work for regular python floats. Matlab has this, Octave has this (format long/short). It would be very nice if IPython had it too.