Axis: Difference between revisions
From NARS2000
Jump to navigationJump to search
Sudleyplace (talk | contribs) (New page: * Axis operator allowed with primitive scalar dyadic functions (e.g., <apll>1 2+[1] 2 3⍴R</apll>) * Axis operator to primitive scalar dyadic functions may transpose coordinates (e.g., <a...) |
No edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
* Axis operator allowed with primitive scalar dyadic functions (e.g., <apll>1 2+[1] 2 3⍴R</apll>) | * The Axis operator is allowed with all primitive scalar dyadic functions (e.g., <apll>1 2+[1] 2 3⍴R</apll>) and some scalar monadic functions (e.g., <apll><[1] 2 3⍴R</apll>) | ||
* Axis operator to primitive scalar dyadic functions may transpose coordinates (e.g., <apll>(2 3⍴L)+[1 2] 2 3 4⍴R | * The Axis operator is allowed with some primitive operators (e.g., <apll>L←'abcdef' ⋄ R←⍳⍴L ⋄ L ,⍤[1] 0 R ←→ L,[0.5] R</apll>) | ||
* Axis operator to Ravel may transpose coordinates (e.g., <apll>,[2 1] R</apll> and <apll>,[1 2] R</apll> are both valid but, in general, have the same values in different order) | * The Axis operator to primitive scalar dyadic functions may transpose coordinates (e.g., <apll>(2 3⍴L)+[1 2] 2 3 4⍴R ←→ (⍉2 3⍴L)+[2 1] 2 3 4⍴R</apll>) | ||
* Axis operator is allowed on the dyadic derived function from the Each operator (e.g., <apll>(2 3⍴L)⍴¨[1 2] 2 3 4⍴R</apll>) | * The Axis operator to Ravel may transpose coordinates (e.g., <apll>,[2 1] R</apll> and <apll>,[1 2] R</apll> are both valid but, in general, have the same values in different order) | ||
* Axis operator is allowed on user-defined functions/operators (e.g., <apll>FOO[2 3] R</apll> by specifying it in the function header, as in <apll>∇ Z←FOO[X] R</apll>) | * The Axis operator is allowed on the dyadic derived function from the Each operator (e.g., <apll>(2 3⍴L)⍴¨[1 2] 2 3 4⍴R</apll>) | ||
* Axis operator values may be negative. That is, if the largest allowed value is <apll>N</apll>, then the allowable range for axis operator values is <apll>¯1-N</apll> to <apll>N</apll>, inclusive. | * The Axis operator is allowed on user-defined functions/operators (e.g., <apll>FOO[2 3] R</apll> by specifying it in the function header, as in <apll>∇ Z←FOO[X] R</apll>) | ||
* The Axis operator is allowed on Anonymous Functions/Operators/Hyperators using the symbol <apll>χ</apll> within the Anonymous FOH | |||
* If the first element of <apll>⎕FEATURE</apll> is a <apll>1</apll>, the Axis operator values may be negative. That is, if the largest allowed value is <apll>N</apll>, then the allowable range for axis operator values is <apll>1 ¯1[1]-N</apll> to <apll>N</apll>, inclusive. |
Latest revision as of 14:04, 14 September 2022
- The Axis operator is allowed with all primitive scalar dyadic functions (e.g., 1 2+[1] 2 3⍴R) and some scalar monadic functions (e.g., <[1] 2 3⍴R)
- The Axis operator is allowed with some primitive operators (e.g., L←'abcdef' ⋄ R←⍳⍴L ⋄ L ,⍤[1] 0 R ←→ L,[0.5] R)
- The Axis operator to primitive scalar dyadic functions may transpose coordinates (e.g., (2 3⍴L)+[1 2] 2 3 4⍴R ←→ (⍉2 3⍴L)+[2 1] 2 3 4⍴R)
- The Axis operator to Ravel may transpose coordinates (e.g., ,[2 1] R and ,[1 2] R are both valid but, in general, have the same values in different order)
- The Axis operator is allowed on the dyadic derived function from the Each operator (e.g., (2 3⍴L)⍴¨[1 2] 2 3 4⍴R)
- The Axis operator is allowed on user-defined functions/operators (e.g., FOO[2 3] R by specifying it in the function header, as in ∇ Z←FOO[X] R)
- The Axis operator is allowed on Anonymous Functions/Operators/Hyperators using the symbol χ within the Anonymous FOH
- If the first element of ⎕FEATURE is a 1, the Axis operator values may be negative. That is, if the largest allowed value is N, then the allowable range for axis operator values is 1 ¯1[1]-N to N, inclusive.