Reshape: Difference between revisions

Jump to navigation Jump to search
2 bytes added ,  09:05, 30 April 2020
m
m (16 revisions imported: Migrate from miraheze)
Line 28: Line 28:
</source>
</source>


Reshape can also decrease the rank or [[bound]] of an array. One notable example is the use of an empty left argument <source lang=apl inline>[[Zilde|]]</source> to produce a [[scalar]]. The scalar is the first 0-[[cell]] of the right argument. In [[Nested array model|nested]] languages <source lang=apl inline>⍬⍴</source> is like [[First]] except that it does not remove a layer of nesting.
Reshape can also decrease the rank or [[bound]] of an array. One notable example is the use of an empty left argument [[Zilde]] (<source lang=apl inline>⍬</source>) to produce a [[scalar]]. The scalar is the first 0-[[cell]] of the right argument. In [[Nested array model|nested]] languages <source lang=apl inline>⍬⍴</source> is like [[First]] except that it does not remove a layer of nesting.
<source lang=apl>
<source lang=apl>
       9 ⍴ ∘.+⍨ 1 2 1
       9 ⍴ ∘.+⍨ 1 2 1

Navigation menu