diff --git a/sumpy/expansion/multipole.py b/sumpy/expansion/multipole.py index 3d67fde839346b0af27ac7463b9c71d4028c1e9e..a5ac8e145493892bc9b51d787d558ebed28ba7f7 100644 --- a/sumpy/expansion/multipole.py +++ b/sumpy/expansion/multipole.py @@ -91,11 +91,10 @@ class VolumeTaylorMultipoleExpansionBase(MultipoleExpansionBase): rscale = 1 base_taker = kernel.get_derivative_taker(bvec, rscale, sac) - # Following is a no-op, but reduces the cases we have to handle - # in AxisTargetDerivative.postprocess_at_target and - # DirectionalTargetDerivative.postprocess_at_target because - # the type will always be DifferentiatedExprDerivativeTaker - # that we are passing to postprocess_at_target + # Following is a no-op, but AxisTargetDerivative.postprocess_at_target and + # DirectionalTargetDerivative.postprocess_at_target only handles + # DifferentiatedExprDerivativeTaker and sympy expression, so we need to + # make the taker a DifferentitatedExprDerivativeTaker instance. base_taker = DifferentiatedExprDerivativeTaker(base_taker, {tuple([0]*self.dim): 1}) taker = kernel.postprocess_at_target(base_taker, bvec)