#NEWLINE# def tiny2zero( x , eps = 1e-15 ) : #NEWLINE# #INDENT# 'replace abs values smaller than eps by zero, makes copy\n    ' #NEWLINE# mask = ( np . abs ( x . copy ( ) ) < eps ) #NEWLINE# x [ mask ] = 0 #NEWLINE# return x