You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 [4]: set_printoptions(precision=4)
In [5]: array([1.0/3])
Out[5]: array([ 0.3333])
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.
The text was updated successfully, but these errors were encountered:
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 [4]: set_printoptions(precision=4)
In [5]: array([1.0/3])
Out[5]: array([ 0.3333])
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.
The text was updated successfully, but these errors were encountered: