[Numpy-discussion] ndarray display in ipython
Lev Givon
lev at columbia.edu
Sun Jun 12 09:34:35 EDT 2011
Received from Chao YUE on Sun, Jun 12, 2011 at 08:10:41AM EDT:
> Dear all pythoners,
>
> Does anybody know how I can choose the default display style for the data?
> like in the following case, the data are display in a scientific notation if
> they are ver small.
> another question is, the display fold the data in first row into several
> rows if there is still space on my computer screen, how can I adjust it to a
> more viewer friendly way?
>
> In [97]: npdata
>
> array([[ 2.00300000e+03, 4.44500000e+01, 3.56600000e+02,
> 8.73500000e+02, 3.12200000e+02, 5.17000000e+02,
> 1.37100000e+03, 4.54600000e+02, 9.68400000e+03,
> 1.89500000e+00, 3.97300000e+03, 2.04500000e+02,
> 3.10200000e+02, 1.19940000e+04, 2.76800000e+03,
> 1.14100000e+03, 1.00000000e+00],
> [ 2.00400000e+03, 2.63600000e+01, 3.11400000e+02,
> 7.65100000e+02, 2.85100000e+02, 4.53700000e+02,
> 1.34700000e+03, 4.36300000e+02, 9.65400000e+03,
> 1.88100000e+00, 4.07700000e+03, 2.03000000e+02,
> 3.06000000e+02, 1.19180000e+04, 2.87000000e+03,
> 1.17000000e+03, 1.00000000e+00],
> [ 2.00500000e+03, 3.55900000e+01, 3.44500000e+02,
> 8.43900000e+02, 3.08900000e+02, 4.99400000e+02,
> 1.32700000e+03, 4.22500000e+02, 9.62600000e+03,
> 1.89400000e+00, 4.18300000e+03, 2.04400000e+02,
> 3.04600000e+02, 1.18460000e+04, 2.94800000e+03,
> 1.18200000e+03, 1.00000000e+00]])
>
> thank you very much.
>
Take a look at the numpy.set_printoptions function.
L.G.
More information about the NumPy-Discussion
mailing list