[SciPy-user] Array handling

Nils Wagner nwagner at mecha.uni-stuttgart.de
Fri Oct 21 05:50:46 CDT 2005


>>> a=rand(4)
>>> a
array([ 0.53451766,  0.10459875,  0.91114967,  0.70552477])

How can I chop the components of the array a to m decimal places (e.g.
m=2 --> a_new = array(([0.53, 0.10, 0.91, 0.70])) ?
 
Nils



More information about the SciPy-user mailing list