APL Reshape (⍴) Errors: Diagnosing DOMAIN, RANK and Silent Cycling
APL's ⍴ does not raise a shape-mismatch error — it cycles. Here is how to tell cycling from a bad shape operand, and which checks to run first.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
APL's ⍴ does not raise a shape-mismatch error — it cycles. Here is how to tell cycling from a bad shape operand, and which checks to run first.
APL 2020 extended the built-in reshape operator ⍴ with negative dimensions for inferred size and zero dimensions for empty arrays of a given rank. The unresolved decision concerns what happens when the source array's element count does not equal the product of the target shape dimensions. Version assumption: APL 2020 or later. Documentation describes the mis