[issue35606] Add prod() function to the math module

2021-09-28 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset cd00fee8dd63bc3a1360280f55640409cb579a05 by Miss Islington (bot) in branch '3.9': bpo-35606: Fix math.prod tests using 'start' as keyword parameter (GH-28595) (GH-28604)

[issue35606] Add prod() function to the math module

2021-09-28 Thread miss-islington
miss-islington added the comment: New changeset fd52afd1928643a715202147b1ce5b0d130ec252 by Miss Islington (bot) in branch '3.10': bpo-35606: Fix math.prod tests using 'start' as keyword parameter (GH-28595) https://github.com/python/cpython/commit/fd52afd1928643a715202147b1ce5b0d130ec252

[issue35606] Add prod() function to the math module

2021-09-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +26979 pull_request: https://github.com/python/cpython/pull/28604 ___ Python tracker ___

[issue35606] Add prod() function to the math module

2021-09-28 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 84975146a7ce64f1d50dcec8311b7f7188a5c962 by Pablo Galindo Salgado in branch 'main': bpo-35606: Fix math.prod tests using 'start' as keyword parameter (GH-28595)

[issue35606] Add prod() function to the math module

2021-09-28 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 11.0 -> 12.0 pull_requests: +26978 pull_request: https://github.com/python/cpython/pull/28603 ___ Python tracker

[issue35606] Add prod() function to the math module

2021-09-28 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +26975 pull_request: https://github.com/python/cpython/pull/28595 ___ Python tracker ___

[issue35606] Add prod() function to the math module

2019-02-14 Thread Berry Schoenmakers
Berry Schoenmakers added the comment: Thanks for the suggestion, Mark. I was not so sure, and the Nosy List for this issue is already quite extensive, so considered you guys as an appropriate audience for my first comment on this platform. But I will also look into opening a separate issue

[issue35606] Add prod() function to the math module

2019-02-14 Thread Mark Dickinson
Mark Dickinson added the comment: @Berry: I'd suggest opening a separate issue for that discussion; this issue's already closed, so it's likely that few people will notice your message. -- ___ Python tracker

[issue35606] Add prod() function to the math module

2019-02-14 Thread Berry Schoenmakers
Berry Schoenmakers added the comment: Nice to see the arrival of the prod() function. Just as for the built-in pow(x, y[, z]) function it would be very useful to have an optional argument z for computing products modulo z. Typical use case in cryptography would be: prod((pow(x, y, z) for

[issue35606] Add prod() function to the math module

2019-02-06 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35606] Add prod() function to the math module

2019-02-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset bc098515864d0d1ffe8fb97ca1a0526c30fee45a by Raymond Hettinger (Pablo Galindo) in branch 'master': bpo-35606: Implement math.prod (GH-11359) https://github.com/python/cpython/commit/bc098515864d0d1ffe8fb97ca1a0526c30fee45a --

[issue35606] Add prod() function to the math module

2019-02-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: PR 11359 has the following properties in its current state: Performance vs naive implementation --- ./python -m perf timeit -s "import functools;import operator;iterable=list(range(1))"

[issue35606] Add prod() function to the math module

2019-01-05 Thread Tim Peters
Tim Peters added the comment: I'd like to divorce `prod()` from floating-point complications. The `sum()` builtin has proved extremely handy, even for floats, in large part because it's type-agnostic and straightforward. While I'd usually use `prod()` on ints and Fractions, in almost all

[issue35606] Add prod() function to the math module

2019-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: For the record, I would have to look up the documentation everytime I encounter "comb" and "perm", while the full names are intuitive to me. "prod" and "fact" feel somewhat less obscure. I suppose there are two possible audiences here: - the expert math /

[issue35606] Add prod() function to the math module

2019-01-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't like the name overlap with itertools.product(). Currently, math and itertools have no overlapping names. Also, I expect that like sum(), the prod() function will be used with generator comprehensions and should best be kept short and not

[issue35606] Add prod() function to the math module

2019-01-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree with Mark that correctness, rather than performance, should be the main attraction of a stdlib implementation. By the way "prod" is slightly obscure (though it's Numpy's chosen spelling), how about "product"? After all, we went with the full

[issue35606] Add prod() function to the math module

2019-01-04 Thread STINNER Victor
STINNER Victor added the comment: Computing the geometric mean of numbers require to compute the product of these numbers: https://en.wikipedia.org/wiki/Geometric_mean The geometric mean can be used to summarize benchmark results using different units to get a single number. -- When

[issue35606] Add prod() function to the math module

2018-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: [Raymond] > or to implement particular NaN/Inf handling not present in a naive > implementation On this subject, some effort has been made in the past to make (almost) all the math module functions behave consistently with respect to things like

[issue35606] Add prod() function to the math module

2018-12-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I am not sure that a simple one-line function is worth it. FWIW, it is often the one liners that turn out to be the most useful building blocks. In this case the one-liner is inconvenient (two imports), not as fast we would like, and a little opaque:

[issue35606] Add prod() function to the math module

2018-12-30 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: @serhiy.storchaka, it should be possible to make it far simpler if we make math_prod_impl more naive by removing the hypothesis made on `iterable` and the many fast-paths like builtin_sum_impl() does when SLOW_SUM is defined, right? A naive implementation

[issue35606] Add prod() function to the math module

2018-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 11359 looks too complicated. I am not sure that a simple one-line function is worth it. -- nosy: +serhiy.storchaka ___ Python tracker

[issue35606] Add prod() function to the math module

2018-12-29 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: -10678 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35606] Add prod() function to the math module

2018-12-29 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: -10677, 10678 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35606] Add prod() function to the math module

2018-12-29 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch, patch, patch pull_requests: +10676, 10677, 10678 stage: -> patch review ___ Python tracker ___

[issue35606] Add prod() function to the math module

2018-12-29 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +10676 stage: -> patch review ___ Python tracker ___ ___

[issue35606] Add prod() function to the math module

2018-12-29 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch, patch pull_requests: +10676, 10677 stage: -> patch review ___ Python tracker ___

[issue35606] Add prod() function to the math module

2018-12-28 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35606] Add prod() function to the math module

2018-12-28 Thread Raymond Hettinger
New submission from Raymond Hettinger : Back in 2007, a user suggested a built-in prod() function with an API similar to the built-in sum() function. The proposal was rejected because it wasn't needed often enough to justify a builtin function. See https://bugs.python.org/issue1093 Though