@@ -1202,10 +1202,10 @@ def _as_number(self, v, args):
12021202 assert args is not None
12031203 return int (subs_op_args (v , args ))
12041204
1205- def _arg_defaults (self , allocator , alias , args = None ):
1206- # Lazy initialization if `allocator` is necessary as the `allocator`
1207- # type isn't really known until an Operator is constructed
1208- self ._allocator = allocator
1205+ def _arg_defaults (self , alias , args = None ):
1206+ # `allocator` is lazily initialized as it is not known until an Operator
1207+ # is constructed
1208+ self ._allocator = allocator = args . allocator
12091209
12101210 f = alias or self .target .c0
12111211 for i , halo in enumerate (self .halos ):
@@ -1252,7 +1252,7 @@ def _arg_values(self, args=None, **kwargs):
12521252 else :
12531253 alias = f
12541254
1255- return self ._arg_defaults (args . allocator , alias = alias , args = args )
1255+ return self ._arg_defaults (alias = alias , args = args )
12561256
12571257 def _arg_apply (self , * args , ** kwargs ):
12581258 self ._C_memfree ()
@@ -1274,11 +1274,11 @@ class MPIMsgEnriched(MPIMsg):
12741274 (_C_field_components , POINTER (c_int )),
12751275 ]
12761276
1277- def _arg_defaults (self , allocator , alias = None , args = None ):
1278- super ()._arg_defaults (allocator , alias , args = args )
1277+ def _arg_defaults (self , alias = None , args = None ):
1278+ super ()._arg_defaults (alias , args = args )
12791279
12801280 f = alias or self .target .c0
1281- neighborhood = f .grid .distributor .neighborhood
1281+ neighborhood = args .grid .distributor .neighborhood
12821282
12831283 for i , halo in enumerate (self .halos ):
12841284 entry = self .value [i ]
0 commit comments