Title: Pruthviraj Gojare — R23-T041: Make maths/radix2_fft.py fully typed · Issue #5 · S-AI-Projects/TheAlgorithms-Python · GitHub
Open Graph Title: Pruthviraj Gojare — R23-T041: Make maths/radix2_fft.py fully typed · Issue #5 · S-AI-Projects/TheAlgorithms-Python
X Title: Pruthviraj Gojare — R23-T041: Make maths/radix2_fft.py fully typed · Issue #5 · S-AI-Projects/TheAlgorithms-Python
Description: Student: Pruthviraj Gojare Task: R23-T041 · 1 of 10 Repository: https://github.com/S-AI-Projects/TheAlgorithms-Python Assigned working branch: student/e26b07f0834 Goal Add accurate type hints so the type checker CI runs (ty) has nothing ...
Open Graph Description: Student: Pruthviraj Gojare Task: R23-T041 · 1 of 10 Repository: https://github.com/S-AI-Projects/TheAlgorithms-Python Assigned working branch: student/e26b07f0834 Goal Add accurate type hints so th...
X Description: Student: Pruthviraj Gojare Task: R23-T041 · 1 of 10 Repository: https://github.com/S-AI-Projects/TheAlgorithms-Python Assigned working branch: student/e26b07f0834 Goal Add accurate type hints so th...
Opengraph URL: https://github.com/S-AI-Projects/TheAlgorithms-Python/issues/5
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Pruthviraj Gojare — R23-T041: Make maths/radix2_fft.py fully typed","articleBody":"\u003c!-- sai-task-v1:R23-T041 -->\n\n## Student: Pruthviraj Gojare\n\n**Task:** R23-T041 · 1 of 10\n**Repository:** https://github.com/S-AI-Projects/TheAlgorithms-Python\n**Assigned working branch:** `student/e26b07f0834`\n\n## Goal\n\nAdd accurate type hints so the type checker CI runs (ty) has nothing to report for this file. Functions missing hints: `__init__`, `__dft`, `__multiply`. Three functions lack hints and the file uses numpy and mpmath – type the polynomial coefficient lists precisely.\n\n## Steps\n\n1. Run `uv run --python 3.15 --with ty ty check maths/radix2_fft.py` (as in .github/workflows/ty.yml) and save the output.\n2. Add parameter and return types for every function; prefer precise types (e.g. `list[list[int]]`) over `Any`.\n3. Fix any real bug the checker exposes, and add a doctest for it.\n4. Run the doctests to confirm behaviour is unchanged.\n5. Make the code change in the repository: maths/radix2_fft.py: type hints for the 3 unhinted functions. Re-run the automated check and the repo's own tests afterwards.\n6. Prepare the PR: on branch R23-T041, commit the code change plus your work/R23-T041/ evidence, put your findings in the PR description and open the PR against the org fork. For a later upstream PR, create a second branch containing only the code change (no work/ folder).\n\n## Done when\n\n☐ maths/radix2_fft.py: __init__, __dft and __multiply have full hints (polynomial coefficients typed precisely).\n☐ ty output before/after in the PR, clean for this file (maths/radix2_fft.py).\n☐ Existing 5 doctests pass (maths/radix2_fft.py).\n\n\u003cdetails>\n\u003csummary>Additional task guidance\u003c/summary>\n\n\nAdditional curated task guidance\n\nItem:\n`maths/radix2_fft.py` (178 lines; 5 doctests)\n\nTask type:\nType hints & ty\n\nCode change (goes into the PR):\nmaths/radix2_fft.py: type hints for the 3 unhinted functions.\n\nAutomated check:\nuv run --python 3.15 --with ty ty check maths/radix2_fft.py && uv run pytest maths/radix2_fft.py\n\nPrerequisites:\nLinux/WSL2/Codespaces with uv (https://docs.astral.sh/uv/getting-started/installation/); run `uv sync --group=test` once – it installs the Python version CI uses (.python-version = 3.15t) and the test dependencies, about 1–2 GB\n\nUpstream PR rules:\nFollow CONTRIBUTING.md: type hints on every parameter/return, doctests for valid and erroneous input, snake_case file names, no duplicate of an existing implementation, no hand edits to DIRECTORY.md. CI (pytest with doctests, ruff) must pass – bots close PRs without tests or type hints. Keep work/ (benchmarks, notes, property tests) out of the upstream branch; put results in the PR description.\n\nSource (pinned):\nhttps://github.com/TheAlgorithms/Python/blob/574d100b7181956e9c8384552fd078165e4cc326/maths/radix2_fft.py\n\nChange:\nNo change recorded\n\nPR destination:\nPreserved pilot guidance\n\n\n\u003c/details>\n\n## Submission checklist\n\n- [ ] Complete this task and its checks.\n- [ ] Add the required evidence and link your pull request here.\n- [ ] Select this **S-AI-Projects fork** as the PR base repository.\n- [ ] Request instructor review.\n\nKeep this PR focused on this task. Do not submit assignment PRs to the upstream repository.","author":{"url":"https://github.com/ankushbisht01","@type":"Person","name":"ankushbisht01"},"datePublished":"2026-11-03T14:41:27Z","url":"https://github.com/S-AI-Projects/TheAlgorithms-Python/issues/5"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a1ab7cf4-40d9-7059-6b9d-e640af8e4d42 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E44C:1E6531:7E119:B305C:6AFDD6E4 |
| html-safe-nonce | f1ea49cf05bcfcfa9bf8a6507c615fbc54d7fbce052cc428debbf1632c25c615 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDRDOjFFNjUzMTo3RTExOTpCMzA1Qzo2QUZERDZFNCIsInZpc2l0b3JfaWQiOiIyMDA0MDc3NTA5MjgwMTI2NjkyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 96151fb26db3f1484f0e285722aef2ab12e17342c86d167d0fd2e5efc77ee6ec |
| hovercard-subject-tag | issue:6184859719 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/S-AI-Projects/TheAlgorithms-Python/5/issue_layout |
| twitter:image | https://opengraph.githubassets.com/84039ad776e86ef5c437eb23f148a50328dd7d51165782a3ae5ac094b2f2cabe/S-AI-Projects/TheAlgorithms-Python/issues/5 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/84039ad776e86ef5c437eb23f148a50328dd7d51165782a3ae5ac094b2f2cabe/S-AI-Projects/TheAlgorithms-Python/issues/5 |
| og:image:alt | Student: Pruthviraj Gojare Task: R23-T041 · 1 of 10 Repository: https://github.com/S-AI-Projects/TheAlgorithms-Python Assigned working branch: student/e26b07f0834 Goal Add accurate type hints so th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ankushbisht01 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9918bd4004419458bcd838065ac2a76b76ebd11705d73909fff5ab99e996fa23 |
| turbo-cache-control | no-preview |
| go-import | github.com/S-AI-Projects/TheAlgorithms-Python git https://github.com/S-AI-Projects/TheAlgorithms-Python.git |
| octolytics-dimension-user_id | 351892385 |
| octolytics-dimension-user_login | S-AI-Projects |
| octolytics-dimension-repository_id | 1444141022 |
| octolytics-dimension-repository_nwo | S-AI-Projects/TheAlgorithms-Python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 63476337 |
| octolytics-dimension-repository_parent_nwo | TheAlgorithms/Python |
| octolytics-dimension-repository_network_root_id | 63476337 |
| octolytics-dimension-repository_network_root_nwo | TheAlgorithms/Python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | a231c174493a6a442c0b0544475c918b30128208 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width