May have a complicating issue with the array?  Have
the numbers have been interpreted as strings?  I have
been pulling them from a Word doc using regex's

print Test
[u'9.0', u'58.6', u'97.8', u'10.0', u'9.6', u'28.1']


Lance


Alexander Schmolck wrote:
> Lance Hoffmeyer <[EMAIL PROTECTED]> writes:
> 
>> Is there an easy way to round numbers in an array?
>>
>> I have
>> Test = [1.1,2.2,3.7]
>>
>> and want to round so the values are
>>
>> print Test  [1,2,4]
> 
> [int(x+0.5) for x in Test]
> 
> 'as
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to