From 68468afc591b2dc80669d9b7ae83f032ef116141 Mon Sep 17 00:00:00 2001 From: Marco De Donno Date: Thu, 24 Nov 2016 18:51:50 +0100 Subject: [PATCH] Migration of the lstTo012() function to use the Minutiae attributes instead of unpacking to variables --- NIST/fingerprint/functions.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NIST/fingerprint/functions.py b/NIST/fingerprint/functions.py index 041722a..d12857d 100644 --- a/NIST/fingerprint/functions.py +++ b/NIST/fingerprint/functions.py @@ -62,15 +62,15 @@ def lstTo012( lst ): else: try: ret = [ - [ id, "%04d%04d%03d" % ( round( float( x ) * 100 ), round( float( y ) * 100 ), theta ), q, d ] - for id, x, y, theta, q, d in lst + [ m.i, "%04d%04d%03d" % ( round( float( m.x ) * 100 ), round( float( m.y ) * 100 ), m.t ), m.q, m.d ] + for m in lst ] except: ret = [] i = 1 - for x, y, theta in lst: - ret.append( [ i, "%04d%04d%03d" % ( round( float( x ) * 100 ), round( float( y ) * 100 ), theta ), '00', 'A' ] ) + for m in lst: + ret.append( [ i, "%04d%04d%03d" % ( round( float( m.x ) * 100 ), round( float( m.y ) * 100 ), m.t ), '00', 'A' ] ) i += 1 return join_r( [ US, RS ], ret ) -- GitLab