[Type] ndarray typing 3: Add cook_dtype calls at C++ boundaries#413
[Type] ndarray typing 3: Add cook_dtype calls at C++ boundaries#413hughperkins wants to merge 6 commits intohp/typing-t4-2-ndarray-subscriptfrom
Conversation
89f34d8 to
72a9636
Compare
219619c to
5762be5
Compare
|
Opus 4.6 review: PR Review: hp/typing-t4-3-cook-dtypeBranch: SummaryThis PR adds Issues Found1. Bug fix (positive finding):
|
72a9636 to
9b5e1a8
Compare
5762be5 to
a402c99
Compare
9b5e1a8 to
1adb863
Compare
…refactor) Add cook_dtype() calls at all points where dtype values are passed to C++ code. Make PyQuadrants.default_fp/ip/up into properties that always store DataTypeCxx. Rename shadowed dtype var in create_field_member. All changes are behavioral no-ops with current code, preparing for a future refactor of primitive dtypes into Python classes.
1adb863 to
71dcd62
Compare
The previous code overwrote the outer `dtype` parameter in the debug checkbit block, causing x_dual to be created with the wrong dtype.
Verify that forward-mode AD produces correct results when debug=True, guarding against the previous bug where the checkbit block's local dtype variable shadowed the outer dtype parameter.
The regression test covers this; no need for a code comment.
When dtype is provided it is already cooked at the top of the function, so the per-branch cook_dtype(constant_dtype) was a no-op. Now only the fallback default_fp/default_ip paths are cooked.
…refactor)
Add cook_dtype() calls at all points where dtype values are passed to C++ code. Make PyQuadrants.default_fp/ip/up into properties that always store DataTypeCxx. Rename shadowed dtype var in create_field_member. All changes are behavioral no-ops with current code, preparing for a future refactor of primitive dtypes into Python classes.
Issue: #
Brief Summary
copilot:summary
Walkthrough
copilot:walkthrough