Take: Difference between revisions

Jump to navigation Jump to search
286 bytes added ,  14:51, 4 November 2019
Miraheze>Adám Brudzewsky
Miraheze>Marshall
Line 72: Line 72:


When Take is called with [[Function axis|axis]], the axis determines how elements of the left argument correspond to axes of the right argument. The left argument and axis are required to have rank no more than 1 and are treated as vectors. Their lengths must match, and be less than or equal to the rank of the right argument. Then each element of the left argument applies to the right argument axis given by the corresponding element of the axis vector. Each axis may only be specified once, and unspecified axes are left unchanged.
When Take is called with [[Function axis|axis]], the axis determines how elements of the left argument correspond to axes of the right argument. The left argument and axis are required to have rank no more than 1 and are treated as vectors. Their lengths must match, and be less than or equal to the rank of the right argument. Then each element of the left argument applies to the right argument axis given by the corresponding element of the axis vector. Each axis may only be specified once, and unspecified axes are left unchanged.
=== APLX fills ===
In [[APLX]], the [[fill element]]s used in Take are not always the argument array's [[prototype]]: new elements in rows (that is, 1-[[cell]]s) that already exist are filled based on the first element of that row while new rows use the prototype of the whole array.


=== APL model ===
=== APL model ===
Anonymous user

Navigation menu