4,494
edits
No edit summary |
|||
Line 79: | Line 79: | ||
</source> | </source> | ||
Decode has an important property with array [[index]]: Given an arbitrary array A with [[shape]] S, the index of an [[element]] in A can be decoded with S to obtain the corresponding index in the [[ravel]] of A. Decoding all indices given by [[Index Generator]] shows the ravel order of the elements of an array with the given shape. Note that <source lang=apl inline>⎕IO←0</source> is required for this to hold. | Decode has an important property with array [[index]]: Given an arbitrary array A with [[shape]] S, the index of an [[element]] in A can be decoded with S to obtain the corresponding index in the [[ravel]] of A. Decoding all indices given by [[Index Generator]] shows the ravel order of the elements of an array with the given shape. Note that [[index origin]] 0 (<source lang=apl inline>⎕IO←0</source>) is required for this to hold. | ||
<source lang=apl> | <source lang=apl> |