#NEWLINE# @ staticmethod #NEWLINE# def _to_hash( projected ) : #NEWLINE# #INDENT# if ( ( projected . shape [ 1 ] % 8 ) != 0 ) : #NEWLINE# #INDENT# raise ValueError ( 'Require reduced dimensionality to be a multiple of 8 for hashing' ) #NEWLINE# #UNINDENT# out = np . packbits ( ( projected > 0 ) . astype ( int ) ) . view ( dtype = HASH_DTYPE ) #NEWLINE# return out . reshape ( out . shape [ 0 ] , ( - 1 ) )