]> git.donarmstrong.com Git - lilypond.git/commitdiff
Correctly parses C++ nan values in output-distance.py.
authorMike Solomon <mike@apollinemike.com>
Tue, 9 Aug 2011 06:49:57 +0000 (08:49 +0200)
committerMike Solomon <mike@apollinemike.com>
Tue, 9 Aug 2011 06:49:57 +0000 (08:49 +0200)
scripts/build/output-distance.py

index c08ea147b86eb40556f77d0f0d384e56c93741f7..537363b63a4958b26ab2698e72d08ff91c858aaa 100644 (file)
@@ -313,12 +313,15 @@ class SystemLink:
                 self.orphan_count (),
                 self.geometric_distance ())
 
+def scheme_float (s) :
+  return float(s) if 'nan' not in s else float(s.split('.')[0])
+
 def read_signature_file (name):
     print 'reading', name
 
     entries = open (name).read ().split ('\n')
     def string_to_tup (s):
-        return tuple (map (float, s.split (' ')))
+        return tuple (map (scheme_float, s.split (' ')))
 
     def string_to_entry (s):
         fields = s.split('@')