Difference between revisions of "Axis"

From NARS2000
Jump to navigationJump to search
 
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>&lt;[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</apll> and <apll>(⍉2 3⍴L)+[2 1] 2 3 4⍴R</apll> are identical)
+
* 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 ¯1[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>)
 +
* 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 23:38, 15 April 2018

  • 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)
  • 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.