@@ -367,11 +367,11 @@ def brute_check(segments, qpoints): # noqa: ARG001
367367 t0 = time .time ()
368368 g2 = BruteSegmentLocator (segs )
369369 t1 = time .time ()
370- print ("Created Brute in % 0.4f seconds" % ( t1 - t0 ) )
370+ print (f "Created Brute in { t1 - t0 : 0.4f} seconds" )
371371 t2 = time .time ()
372372 q = list (map (g2 .nearest , qpoints ))
373373 t3 = time .time ()
374- print ("Brute Found %d matches in % 0.4f seconds" % ( len ( qpoints ), t3 - t2 ) )
374+ print (f "Brute Found { len ( qpoints ) } matches in { t3 - t2 : 0.4f} seconds" )
375375 print ("Total Brute Time:" , t3 - t0 )
376376 print ()
377377 return q
@@ -383,8 +383,8 @@ def grid_check(bins, segments, qpoints, visualize=False):
383383 t1 = time .time ()
384384 g .grid .kd # noqa: B018
385385 t2 = time .time ()
386- print ("Created Grid in % 0.4f seconds" % ( t1 - t0 ) )
387- print ("Created KDTree in % 0.4f seconds" % ( t2 - t1 ) )
386+ print (f "Created Grid in { t1 - t0 : 0.4f} seconds" )
387+ print (f "Created KDTree in { t2 - t1 : 0.4f} seconds" )
388388 if visualize :
389389 pylab .matshow (
390390 g .grid .mask , origin = "lower" , extent = g .grid .x_range + g .grid .y_range
@@ -393,7 +393,7 @@ def grid_check(bins, segments, qpoints, visualize=False):
393393 t2 = time .time ()
394394 list (map (g .nearest , qpoints ))
395395 t3 = time .time ()
396- print ("Grid Found %d matches in % 0.4f seconds" % ( len ( qpoints ), t3 - t2 ) )
396+ print (f "Grid Found { len ( qpoints ) } matches in { t3 - t2 : 0.4f} seconds" )
397397 print ("Total Grid Time:" , t3 - t0 )
398398 qps = len (qpoints ) / (t3 - t2 )
399399 print ("q/s:" , qps )
0 commit comments