Here's an array
a = [[ -2.66453526e-15, 4.49564793e-02, 1.14401980e+00],
[ 2.02475000e+00, 2.06970648e+00, 1.14401980e+00],
[ 2.02475000e+00, 4.49564793e-02, 3.16876980e+00],
[ -2.66453526e-15, 2.06970648e+00, 3.16876980e+00],
[ -2.66453526e-15, 4.49564793e-02, 5.19351980e+00],
[ 2.02475000e+00, 2.06970648e+00, 5.19351980e+00],
[ 2.02475000e+00, 4.49564793e-02, 7.21826980e+00],
[ 0.00000000e+00, 2.02475000e+00, 7.08662500e+00]]
Now, call
array_repr(a, precision=12, suppress_small=True)
which gives the output
array([[-0. , 0.0449564793, 1.1440198 ],
[ 2.02475 , 2.06970648 , 1.1440198 ],
[ 2.02475 , 0.0449564793, 3.1687698 ],
[-0. , 2.06970648 , 3.1687698 ],
[-0. , 0.0449564793, 5.1935198 ],
[ 2.02475 , 2.06970648 , 5.1935198 ],
[ 2.02475 , 0.0449564793, 7.2182698 ],
[ 0. , 2.02475 , 7.086625 ]])
* Since the flag 'suppress_small=True' is used, I'd expect a '0.'
instead of a '-0.' or maybe this is intentional.
* Also, wouldn't '0.0' instead of '0.' be more readable (and there's
certainly space enough to add it)?
Best regards,
Mads
--
+-----------------------------------------------------+
| Mads Ipsen |
+----------------------+------------------------------+
| Gåsebæksvej 7, 4. tv | |
| DK-2500 Valby | phone: +45-29716388 |
| Denmark | email: [email protected] |
+----------------------+------------------------------+
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion