Sergey B Kirpichev
Sergey B Kirpichev
> Could you explain to me why the tanh-sinh quadrature in bounded to 3-dimensional problems ? I would guess it's just to simplify implementation. > Would it be enough to...
closed in favor of #683
See also https://github.com/python/cpython/pull/121677
Also see #96640. @sobolevn, did you actually *try* to do conversion and benchmark it?
CC @sobolevn, as you have added AC comment.
I did some benchmarks. ```py # a.py import pyperf from functools import reduce f = lambda x, y: x + y lst = list(range(10)) init = 123 runner = pyperf.Runner()...
Now with AC (patch2). Patch with AC (a draft). ```diff diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c index 802b1cf792..8faa8ad1ac 100644 --- a/Modules/_functoolsmodule.c +++ b/Modules/_functoolsmodule.c @@ -932,15 +932,30 @@ _functools_cmp_to_key_impl(PyObject *module, PyObject *mycmp) /*...
> it should be done for all parameters, not just the initial That might slowdown the patch v2. > No, it doesn't. Someone can use None as initial value. That...
> I think reduce(function, iterable, /, initial) is closer representation No. Current code in the main more accurately can be described as function with multiple signatures. Funny notation ``reduce(function, iterable[,...
Yes, tests should be adjusted. @sayandipdutta, CI must be green! (FYI: https://devguide.python.org/getting-started/pull-request-lifecycle/#making-good-prs) I've tried to implement @Eclips4 suggestion to make *all* arguments positional-or-keyword, but this seems to be impossible with...