Commit Graph

185 Commits

Author SHA1 Message Date
Raymond Hettinger 7709037095
Small speed-up for the convolve() recipe. (GH-106371) 2023-07-03 15:38:38 -05:00
Raymond Hettinger 423459be2f
sliding_window() recipe: Raise ValueError for non-positive window sizes. Add more tests. (GH-105403) 2023-06-06 13:44:45 -05:00
Raymond Hettinger 278030a17d
Misc improvements to the itertools docs (GH-104916) 2023-05-24 22:31:02 -05:00
Raymond Hettinger c3453fbb11
Update itertool recipe: polynomial_from_roots() (GH-103973) 2023-04-28 12:25:50 -05:00
Raymond Hettinger f65fdbb8fd
Itertool recipe improvements (GH-103399) 2023-04-09 14:17:37 -05:00
Raymond Hettinger 16f6165b71
Minor readability improvement to the factor() recipe (GH-102971) 2023-03-23 14:46:15 -05:00
Raymond Hettinger 0214c7ad90
Tweak polynomial itertool recipes (GH-102880) 2023-03-21 13:21:57 -05:00
wim glenn 4bb1dd3c5c
gh-102876: remove superfluous parens from itertools.batched recipe (GH-102877)
remove superfluous parens from itertools.batched recipe
2023-03-21 12:06:18 -05:00
Raymond Hettinger 1a5a14183e
The pow() variant further improves accuracy (GH-102866) 2023-03-21 00:02:14 -05:00
Raymond Hettinger 4075fe1d8d
Remove itermediate list. Expand docstring. (GH-102862) 2023-03-20 20:40:04 -05:00
Raymond Hettinger 094cf392f4
Add itertool recipe for polynomial evaluation. (GH-102852) 2023-03-20 17:14:29 -05:00
Stefan Pochmann eaae563b68
gh-102088 Optimize iter_index itertools recipe (GH-102360) 2023-03-01 21:16:23 -06:00
Stefan Pochmann 81bf10e4f2
gh-102105 Fix wording in filterfalse/quantify/filter (GH-102189) 2023-02-24 10:13:05 -06:00
Raymond Hettinger 6bde3d2fd3
Add recipes to showcase tee(), zip*, batched, starmap, and product. (GH-101023) 2023-01-13 19:01:22 -06:00
Raymond Hettinger 47b9f83a83
GH-100485: Add math.sumprod() (GH-100677) 2023-01-07 12:46:35 -06:00
Raymond Hettinger 4ebaae8aed
Improve comments in itertools uniquification recipes (GH-100631) 2022-12-30 20:36:38 -06:00
Raymond Hettinger c4c5790120
Restore early-out to factor(). Strengthen tests. (GH-100591) 2022-12-28 12:29:27 -08:00
Raymond Hettinger 2d52406835
Improve factor() recipe and fix its tests (GH-100576) 2022-12-28 03:13:58 -08:00
Raymond Hettinger 0769f95751
Misc Itertools recipe tweaks (GH-100493) 2022-12-24 00:21:30 -08:00
Raymond Hettinger f89de679ff
Add "strict" to dotproduct(). Add docstring. Factor-out common code. (GH-100480) 2022-12-23 15:52:16 -08:00
Raymond Hettinger 8356c14b4f
Remove uninformative itertools recipe (GH-100253) 2022-12-15 12:39:01 -06:00
Raymond Hettinger 35cc0ea736
GH-98363: Have batched() return tuples (GH-100118) 2022-12-08 15:08:16 -06:00
Julien Palard c1c3be0f9d
Doc: Fix sphinx-lint issues (GH-98911)
They were introduced right between GH-98441 and GH-98408.
2022-10-31 16:30:29 +01:00
Raymond Hettinger a53f637368
Fix markup indentation (GH-98424)
Fix markup
2022-10-18 20:14:41 -05:00
Raymond Hettinger f4ead4874b
General improvements to the itertools docs (GH-98408) 2022-10-18 14:09:34 -05:00
Raymond Hettinger de3ece769a
GH-98363: Add itertools.batched() (GH-98364) 2022-10-17 18:53:45 -05:00
Raymond Hettinger 70732d8a4c
Move random selection recipes from itertools.rst to random.rst (GH-98369) 2022-10-17 17:30:49 -05:00
Raymond Hettinger 3a639bbeac
Improve speed. Reduce auxiliary memory to 16.6% of the main array. (GH-98294) 2022-10-15 16:05:28 -05:00
Raymond Hettinger f4370318d6
Faster sieve() recipe (#98287) 2022-10-15 12:43:58 -05:00
Raymond Hettinger e500cc0451
Misc updates to the itertools recipes and tests (GH-98018) 2022-10-07 03:37:21 -05:00
Raymond Hettinger 78359b1d45
Simplify sieve() recipe. Add edge case tests. (GH-96892) 2022-09-17 11:31:04 -05:00
Raymond Hettinger 8dc9b3fbc1
Itertools sieve() recipe (#96813) 2022-09-13 21:10:47 -05:00
Raymond Hettinger 0e28a3a50f
Add polynomial_from_roots() to the itertools recipes (#96102) 2022-08-21 09:41:29 -05:00
MrSuspicious 757c383d24
gh-96039: Corrected wording error in itertools doc (GH-96105) 2022-08-19 01:20:45 -05:00
Raymond Hettinger 59719a242d
Take advantage of math.comb() in the nth_combination() recipe (#93027) 2022-05-20 18:02:33 -05:00
Ville Skyttä dc14e33eff
bpo-22295: use python -m pip rather than plain pip in more examples (GH-24003) 2022-04-09 14:37:01 -04:00
Raymond Hettinger 06a491179f
Add recipe for subslices (GH-31028) 2022-02-01 22:18:52 -06:00
Raymond Hettinger ee60550e9b
Move doctests to the main docs. Eliminate duplication. Improve coverage. (GH-30869) 2022-01-25 06:56:53 -06:00
Raymond Hettinger 270a09184d
Improve grouper() recipe to demonstrate all forms of zip() (GH-30837) 2022-01-23 14:31:10 -06:00
Raymond Hettinger fcbf9b176b
Docs: Clarify the before_and_after() example (GH-28458) 2021-09-19 19:52:27 -05:00
Raymond Hettinger 80d9ff1648
Fix typo and add a module prefix (GH-28401) 2021-09-16 23:49:41 -05:00
Raymond Hettinger 750368cbcd
Add more itertool recipes (GH-28165) 2021-09-07 12:29:00 -05:00
Raymond Hettinger 91be41ad93
bpo-44571: Add itertool recipe for a variant of takewhile() (GH-28167) 2021-09-05 00:09:26 -05:00
Raymond Hettinger f421bfce80
Minor improvements to the convolve() recipe (GH-24012)
* Minor improvement to speed and space efficiency for the convolve() recipe
* Don't require convolve's kernel to be a sequence.
2020-12-30 12:51:19 -08:00
Raymond Hettinger 77fde8dc16
Add convolve() to the itertools recipes (GH-23928) 2020-12-25 16:43:20 -08:00
Zackery Spytz 074ad5123f
bpo-42670: Fix a missing word in the itertools.product() docs (GH-23823) 2020-12-17 12:24:43 -08:00
Raymond Hettinger cc061d0e6f
bpo-38200: Add itertools.pairwise() (GH-23549) 2020-11-30 20:42:54 -08:00
Raymond Hettinger fc40b3020c
bpo-42450: Minor updates to the itertools recipes (GH-23555) 2020-11-29 10:47:22 -08:00
Ruaridh Williamson 5e0ed8abc9
Note the output ordering of combinatoric functions (GH-19732) 2020-05-28 12:56:43 -07:00
Ramil Nugmanov cfc6ce4d40
bpo-40806: Clarify that itertools.product immediately consumes its inpt (GH-20492) 2020-05-28 09:46:22 -07:00