Repository navigation
Fix math reduction conversion and numeric protocol handling - #9666
Conversation
Preserve dist materialization and coordinate conversion order, exact-type prod fast paths, and sumprod iterator errors and boolean compensation. Assisted-by: OpenAI Codex:model version not exposed
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Merging this PR will not alter performance
Comparing Footnotes
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
Align math reduction protocol handling with CPython 3.15:
distpoints and check dimensions before converting coordinates; convert matching coordinates in p/q order and read tuple subclasses directly.prodfast paths to exact builtin types, preserving float subclass multiplication and empty-product results. Simplify the staged accumulator and enable its integer path for explicit integer starts.sumproditerator construction and exception order, including errors paired with exhaustion. Include bool weights in compensated float accumulation.Uses existing typed argument binding, sequence conversion, arithmetic, and pymath norm/compensation machinery. No tests, Python files, or workflows changed.
Source comparison
Compared against CPython revision d220409a13b77de7a6c30abe16ea90db01528edc:
Validation
-D warnings) for rustpython-vm, rustpython-host_env, and rustpython-stdlib with rustpython-stdlib/threading, locked/offline and one build job, against base 0b081b0.This does not claim full math parity. In particular, sumprod retains its existing O(n) buffered float-pair storage rather than implementing CPython’s streaming accumulator.
AI-assisted implementation and source comparison using OpenAI Codex (model version not exposed), directed by the maintainer.