inducer / pytential

Evaluate layer and volume potentials accurately. Solve integral equations.
https://pypi.python.org/pypi/pytential
25 stars 15 forks source link

Discussion: Deprecate overloading `__new__` for operator application? #246

Open inducer opened 2 hours ago

inducer commented 2 hours ago

Suppose x is a numpy object array of densities.

Now: S(x) returns a vector of single-layer potentials.

A possible future: componentwise(S, x) returns a vector of single-layer potentials.

Context/motivation: https://github.com/inducer/pytential/pull/245#discussion_r1844481562

cc @alexfikl

alexfikl commented 2 hours ago

I would argue for:

I don't know if being explicit with componentwise(Something, operand, **kwargs) in a lot of places is worth it..

inducer commented 43 minutes ago

D'oh! Yes, you're right of course. That sounds like a good plan. Let's deprecate the __new__ thing and have a vectorizing function.