@@ -289,7 +289,7 @@ def _p2e(actx, psource, center, rscale, order: int, p2e, expn_class, expn_kwargs
289289 centers = actx .from_numpy (
290290 np .array (center , dtype = np .float64 ).reshape (toy_ctx .kernel .dim , 1 ))
291291
292- coeffs , = p2e (
292+ coeffs = p2e (
293293 actx ,
294294 source_boxes = source_boxes ,
295295 box_source_starts = box_source_starts ,
@@ -379,7 +379,7 @@ def _e2e(actx: PyOpenCLArrayContext,
379379 ** toy_ctx .extra_kernel_kwargs ,
380380 }
381381
382- to_coeffs , = e2e (** args )
382+ to_coeffs = e2e (** args )
383383 return expn_class (
384384 toy_ctx , to_center , to_rscale , to_order ,
385385 actx .to_numpy (to_coeffs [1 ]),
@@ -739,7 +739,7 @@ class Sum(PotentialExpressionNode):
739739 def eval (self , actx : PyOpenCLArrayContext , targets : np .ndarray ) -> np .ndarray :
740740 result = np .zeros (targets .shape [1 ])
741741 for psource in self .psources :
742- result += psource .eval (actx , targets )
742+ result = result + psource .eval (actx , targets )
743743
744744 return result
745745
@@ -753,7 +753,7 @@ class Product(PotentialExpressionNode):
753753 def eval (self , actx : PyOpenCLArrayContext , targets : np .ndarray ) -> np .ndarray :
754754 result = np .ones (targets .shape [1 ])
755755 for psource in self .psources :
756- result *= psource .eval (actx , targets )
756+ result = result * psource .eval (actx , targets )
757757
758758 return result
759759# }}}
0 commit comments