Take: Difference between revisions

Jump to navigation Jump to search
23 bytes added ,  08:38, 15 November 2019
Miraheze>Adám Brudzewsky
Miraheze>Marshall
Line 67: Line 67:
For each modified axis the result length along that axis is equal to the corresponding element of <source lang=apl inline>|X</source>. If the original element in <source lang=apl inline>X</source> is positive then the result is aligned with the argument at the beginning of that axis, and if that element is negative they are aligned at the end. If it is zero then the result is empty, so both are true. Elements from the right argument are used in the result until the result is filled. If the argument axis is shorter than the result axis then [[Fill element|fills]] are used once it is exhausted. If the result is empty, its [[prototype]] is the same as the right argument's.
For each modified axis the result length along that axis is equal to the corresponding element of <source lang=apl inline>|X</source>. If the original element in <source lang=apl inline>X</source> is positive then the result is aligned with the argument at the beginning of that axis, and if that element is negative they are aligned at the end. If it is zero then the result is empty, so both are true. Elements from the right argument are used in the result until the result is filled. If the argument axis is shorter than the result axis then [[Fill element|fills]] are used once it is exhausted. If the result is empty, its [[prototype]] is the same as the right argument's.


If the result is no larger than the right argument along each axis (equivalently, no fills are used, or <source lang=apl inline>(|X)≤(≢X)↑⍴Y</source>), then the result is a [[subarray]] of <source lang=apl inline>Y</source>. Not all subarrays can be produced in this way: only those which align with one boundary of the argument along each axis.
If the result is no larger than the right argument along each axis (equivalently, no fills are used, or <source lang=apl inline>(|X)≤(≢X)↑⍴Y</source>), then the result is a [[subarray]] of <source lang=apl inline>Y</source>. Not all subarrays can be produced in this way: only those which have the same rank and align with one boundary of the argument along each axis.


=== Axis specification ===
=== Axis specification ===
Anonymous user

Navigation menu