[Type] ndarray typing 2: Fix NDArray single-arg subscript crash#412
[Type] ndarray typing 2: Fix NDArray single-arg subscript crash#412hughperkins wants to merge 2 commits intohp/typing-t4-1-eval-strfrom
Conversation
219619c to
5762be5
Compare
|
Opus 4.6 review: PR Review: hp/typing-t4-2-ndarray-subscriptSummaryThis PR fixes Issues FoundNo issues found. The change is correct and all 190 ndarray-related tests pass. Suggestions for Improvement
|
5762be5 to
a402c99
Compare
NdarrayType.__class_getitem__ crashed when called with a single arg (e.g. NdarrayType[dtype]) because it tried to unpack a non-tuple. Wrap single args in a tuple before passing to __init__.
Test that NDArray[dtype] (without ndim) works and produces an NdarrayType with the correct dtype and ndim=None.
f0a7816 to
050f3a7
Compare
NdarrayType.class_getitem crashed when called with a single arg (e.g. NdarrayType[dtype]) because it tried to unpack a non-tuple. Wrap single args in a tuple before passing to init.
Issue: #
Brief Summary
copilot:summary
Walkthrough
copilot:walkthrough