#NEWLINE# def calc_hash( self ) : #NEWLINE# #INDENT# base = ( numpy . arange ( 0.0 , float ( self . hashsize ) , 1.0 ) / self . hashsize ) #NEWLINE# base = ( numpy . sinh ( ( self . factor * base ) ) / self . nonlinearity ) #NEWLINE# base = base . clip ( 0.0 , 1.0 ) #NEWLINE# l = ( base * ( self . colorlen - 1 ) ) #NEWLINE# self . hash = l . astype ( numpy . uint ) #NEWLINE# self . check_hash ( )