@@ -4333,17 +4333,17 @@ def __str__(self):
43334333
43344334 # Rename internal variables
43354335 for i , r in enumerate (self .fgraph .inputs ):
4336- r .name = f"i{ int ( i ) } "
4336+ r .name = f"i{ i } "
43374337 for i , r in enumerate (self .fgraph .outputs ):
4338- r .name = f"o{ int ( i ) } "
4338+ r .name = f"o{ i } "
43394339 io = set (self .fgraph .inputs + self .fgraph .outputs )
43404340 for i , r in enumerate (self .fgraph .variables ):
43414341 if (
43424342 not isinstance (r , Constant )
43434343 and r not in io
43444344 and len (self .fgraph .clients [r ]) > 1
43454345 ):
4346- r .name = f"t{ int ( i ) } "
4346+ r .name = f"t{ i } "
43474347
43484348 if len (self .fgraph .outputs ) > 1 or len (self .fgraph .apply_nodes ) > 10 :
43494349 self ._name = "Composite{...}"
@@ -4431,7 +4431,7 @@ def c_code_template(self):
44314431 return self ._c_code
44324432
44334433 fg = self .fgraph
4434- subd = {e : f"%(i{ int ( i ) } )s" for i , e in enumerate (fg .inputs )}
4434+ subd = {e : f"%(i{ i } )s" for i , e in enumerate (fg .inputs )}
44354435
44364436 for var in fg .variables :
44374437 if var .owner is None :
@@ -4458,26 +4458,26 @@ def c_code_template(self):
44584458 for output in node .outputs :
44594459 if output not in subd :
44604460 i += 1
4461- name = f"V%(id)s_tmp{ int ( i ) } "
4461+ name = f"V%(id)s_tmp{ i } "
44624462 subd [output ] = name
44634463 _c_code += f"{ output .type .dtype_specs ()[1 ]} { name } ;\n "
44644464
4465- nodename = f"%(nodename)s_subnode{ int ( j ) } "
4465+ nodename = f"%(nodename)s_subnode{ j } "
44664466 nodenames .append (nodename )
44674467
44684468 s = node .op .c_code (
44694469 node ,
44704470 nodename ,
44714471 [subd [input ] for input in node .inputs ],
44724472 [subd [output ] for output in node .outputs ],
4473- dict (fail = "%(fail)s" , id = f"%(id)s_{ int ( j ) } " ),
4473+ dict (fail = "%(fail)s" , id = f"%(id)s_{ j } " ),
44744474 )
44754475 _c_code += s
44764476 _c_code += "\n "
44774477
44784478 # Copy the temporary outputs to the real outputs
44794479 for i , output in enumerate (fg .outputs ):
4480- _c_code += f"%(o{ int ( i ) } )s = { subd [output ]} ;\n "
4480+ _c_code += f"%(o{ i } )s = { subd [output ]} ;\n "
44814481
44824482 _c_code += "}\n "
44834483
@@ -4488,8 +4488,8 @@ def c_code_template(self):
44884488 def c_code (self , node , nodename , inames , onames , sub ):
44894489 d = dict (
44904490 chain (
4491- zip ((f"i{ int ( i ) } " for i in range (len (inames ))), inames , strict = True ),
4492- zip ((f"o{ int ( i ) } " for i in range (len (onames ))), onames , strict = True ),
4491+ zip ((f"i{ i } " for i in range (len (inames ))), inames , strict = True ),
4492+ zip ((f"o{ i } " for i in range (len (onames ))), onames , strict = True ),
44934493 ),
44944494 ** sub ,
44954495 )
0 commit comments