#NEWLINE# def round_number( N ) : #NEWLINE# #INDENT# import numpy #NEWLINE# P = ( 10.0 ** numpy . floor ( numpy . log10 ( abs ( P ) ) ) ) #NEWLINE# return ( ( sign ( N ) * int ( ( ( abs ( N ) / P ) + 0.5 ) ) ) * P )