[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Yash Aggarwal
Yash Aggarwal added the comment: Thanks @rhettinger for cleaning up the code and closing the pr. I didn't get what you meant by long, and sorry for not being much active as well. I am stuck with a pretty time consuming internship. -- versions: +Python 3.6 -Python 3.8

[issue35431] Add a function for computing binomial coefficients to the math module

2019-05-12 Thread Yash Aggarwal
Yash Aggarwal added the comment: @mark.dickinson both pr's are more or less same. Keller was offline for some time so I made the new issue. They were merged later. Only difference is in unittests. I'd say it's up to you to decide which one to keep

[issue35431] Add a function for computing binomial coefficients to the math module

2019-02-27 Thread Yash Aggarwal
Yash Aggarwal added the comment: @mark.dickinson Ok, then I will work on comb for now then. -- ___ Python tracker <https://bugs.python.org/issue35431> ___ ___

[issue35431] Add a function for computing binomial coefficients to the math module

2019-02-23 Thread Yash Aggarwal
Yash Aggarwal added the comment: Can I get a consensus on weather math.perm() is needed? -- ___ Python tracker <https://bugs.python.org/issue35431> ___ ___ Pytho

[issue35431] Add a function for computing binomial coefficients to the math module

2019-01-28 Thread Yash Aggarwal
Yash Aggarwal added the comment: Agreed, comb sounds much better than combination. And using the name binomial would make it sound like something that would puke out whole binomial series rather than a single coefficient(maybe leave it for that in case is it decided to be useful

[issue35656] More matchers in unittest.mock

2019-01-25 Thread Yash Aggarwal
Yash Aggarwal added the comment: > due to floating-point inexactness +1 Its not easy to predict when calculated value will not be equal to expected theoretical value. for example math.cos(radians(90)) is something like 6e-17 rather than 0. Testing for this exact value would be just awkw

[issue35656] More matchers in unittest.mock

2019-01-08 Thread Yash Aggarwal
Yash Aggarwal added the comment: I feel it would be better to have tolerance as an argument. -- nosy: +FR4NKESTI3N ___ Python tracker <https://bugs.python.org/issue35

[issue35672] Error on divide

2019-01-06 Thread Yash Aggarwal
Yash Aggarwal added the comment: @Jorge Teran The division operator was changed in python 3. Now, if you use '/' for division between ints, the result would still be float. To get the same effect as python 2.x, you will have to use '//', i.e. floor division -- nosy: +FR4NKESTI3N

[issue35431] Add a function for computing binomial coefficients to the math module

2019-01-04 Thread Yash Aggarwal
Yash Aggarwal added the comment: @tim.peters Got it. -- ___ Python tracker <https://bugs.python.org/issue35431> ___ ___ Python-bugs-list mailing list Unsub

[issue35431] Add a function for computing binomial coefficients to the math module

2019-01-04 Thread Yash Aggarwal
Yash Aggarwal added the comment: @steven.daprano > Are you also providing a perm(n, k) function? I didn't know it is also being implemented. Should I start on that too? My implementation is based on these requirements: > - Spell it comb(n, k). > - TypeError if args ar

[issue35431] Add a function for computing binomial coefficients to the math module

2019-01-03 Thread Yash Aggarwal
Yash Aggarwal added the comment: I have written the function in the latest patch to work only for positive n. Although the definition of combination or nChoosek makes no sense for negative n, negative binomial distribution exists and so binomial coefficient is defined for negative value

[issue35434] Wrong bpo linked in What's New in 3.8

2019-01-03 Thread Yash Aggarwal
Change by Yash Aggarwal : -- pull_requests: -10809 ___ Python tracker <https://bugs.python.org/issue35434> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35434] Wrong bpo linked in What's New in 3.8

2019-01-03 Thread Yash Aggarwal
Change by Yash Aggarwal : -- pull_requests: -10811 ___ Python tracker <https://bugs.python.org/issue35434> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35434] Wrong bpo linked in What's New in 3.8

2019-01-03 Thread Yash Aggarwal
Change by Yash Aggarwal : -- pull_requests: -10810 ___ Python tracker <https://bugs.python.org/issue35434> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35431] Add a function for computing binomial coefficients to the math module

2019-01-02 Thread Yash Aggarwal
Change by Yash Aggarwal : -- pull_requests: +10812 ___ Python tracker <https://bugs.python.org/issue35431> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35434] Wrong bpo linked in What's New in 3.8

2019-01-02 Thread Yash Aggarwal
Change by Yash Aggarwal : -- pull_requests: +10809, 10810, 10811 ___ Python tracker <https://bugs.python.org/issue35434> ___ ___ Python-bugs-list mailin

[issue35434] Wrong bpo linked in What's New in 3.8

2019-01-02 Thread Yash Aggarwal
Change by Yash Aggarwal : -- pull_requests: +10809, 10810 ___ Python tracker <https://bugs.python.org/issue35434> ___ ___ Python-bugs-list mailing list Unsub

[issue35434] Wrong bpo linked in What's New in 3.8

2019-01-02 Thread Yash Aggarwal
Change by Yash Aggarwal : -- pull_requests: +10809 ___ Python tracker <https://bugs.python.org/issue35434> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35637] Factorial should be able to evaluate float arguments

2019-01-02 Thread Yash Aggarwal
New submission from Yash Aggarwal : Factorial as of now accepts only integers or integral floats. I want to suggest extending the definition of float to accept all positive real numbers to be more consistent with general definition of factorial that uses gamma function. What I am proposing

[issue35431] Add a function for computing binomial coefficients to the math module

2019-01-01 Thread Yash Aggarwal
Yash Aggarwal added the comment: Thanks @mark.dickinson. As @rhettinger suggested, I'll write a basic function that uses division and works in O(k) for now. It's holiday season but hopefully @kellerfuchs will respond by then, and in the meantime I'll write more tests other than pascal's

[issue35431] Add a function for computing binomial coefficients to the math module

2018-12-31 Thread Yash Aggarwal
Yash Aggarwal added the comment: Can I work on C implementation if no-one else is doing it right now? -- nosy: +FR4NKESTI3N ___ Python tracker <https://bugs.python.org/issue35