Arithmetic
+max
+maxYield the maximum value in an array.
Accepts
A $ray.
Produces
A $ray.
Source
++ max
~/ %max
|= a=ray
?> (check a)
=/ fun
|: [b=1 c=-:(ravel a)]
?. =(((fun-scalar meta.a %gth) b c) 0)
b c
(scalar-to-ray meta.a (reel (ravel a) fun))+argmax
+argmaxYield the index of the maximum value in an array. Only returns the first match.
Accepts
A $ray.
Produces
A @ud.
Source
+min
+minYield the minimum value in an array.
Accepts
A $ray.
Produces
A $ray.
Source
+argmin
+argminYield the index of the minimum value in an array. Only returns the first match.
Accepts
A $ray.
Produces
A @ud.
Source
+cumsum
+cumsumYield the cumulative sum of an array.
Accepts
A $ray.
Produces
A $ray.
Source
+prod
+prodYield the cumulative product of an array.
Accepts
A $ray.
Produces
A $ray.
Source
+diag
+diagReturn the diagonal of an array. Enforces that the array is square, and returns a 2D ($n \times 1$) array of the diagonal elements.
Accepts
A $ray.
Produces
A $ray.
Source
+trace
+traceCompute the trace of an array.
Accepts
A $ray.
Produces
A $ray.
Source
+dot
+dotDot product of two arrays.
Accepts
A pair of $rays with the same shape.
Produces
A $ray.
Source
+mmul
+mmulMultiply two matrices (linear algebra).
Accepts
Parameters as specified in source
Produces
See source for return type details.
Source
+abs
+absYield the absolute value of each element of an array as an array.
Accepts
A $ray.
Produces
A $ray.
Source
+add-scalar
+add-scalarYield the sum of an array and a scalar.
Accepts
Parameters as specified in source
Produces
A $ray.
Source
+sub-scalar
+sub-scalarYield the difference of an array and a scalar.
Accepts
Parameters as specified in source
Produces
A $ray.
Source
+mul-scalar
+mul-scalarYield the product of an array and a scalar.
Accepts
Parameters as specified in source
Produces
A $ray.
Source
+div-scalar
+div-scalarYield the quotient of an array and a scalar.
Accepts
Parameters as specified in source
Produces
A $ray.
Source
+mod-scalar
+mod-scalarYield the modulus of an array and a scalar.
Accepts
Parameters as specified in source
Produces
A $ray.
Source
+add
+addAdd two arrays element-wise.
Accepts
Parameters as specified in source
Produces
A $ray.
Source
+sub
+subSubtract two arrays element-wise.
Accepts
Parameters as specified in source
Produces
A $ray.
Source
+mul
+mulMultiply two arrays element-wise.
Accepts
Parameters as specified in source
Produces
A $ray.
Source
+div
+divDivide two arrays element-wise.
Accepts
Parameters as specified in source
Produces
A $ray.
Source
+mod
+modYield the modulus of two arrays element-wise.
Accepts
A pair of $rays with the same shape.
Produces
A $ray.
Source
+pow-n
+pow-nRaise a $ray to the power of an integer .
Accepts
A $ray and an integer power .n (as @ud not @r).
Produces
A $ray.
Source
+gth
+gthReturn the element-wise > greater-than comparison of two arrays, yielding a boolean array.
Accepts
Parameters as specified in source
Produces
A $ray.
Source
+gte
+gteReturn the element-wise >= greater-than-or-equal-to comparison of two arrays, yielding a boolean array.
Accepts
Parameters as specified in source
Produces
A $ray.
Source
+lth
+lthReturn the element-wise < less-than comparison of two arrays, yielding a boolean array.
Accepts
Parameters as specified in source
Produces
A $ray.
Source
+lte
+lteReturn the element-wise <= less-than-or-equal-to comparison of two arrays, yielding a boolean array.
Accepts
Parameters as specified in source
Produces
A $ray.
Source
+equ
+equReturn the element-wise == equality comparison of two arrays, yielding a boolean array.
Accepts
Parameters as specified in source
Produces
A $ray.
Source
+neq
+neqReturn the element-wise != inequality comparison of two arrays, yielding a boolean array.
Accepts
Parameters as specified in source
Produces
A $ray.
Source
+mpow-n
+mpow-nRaise a matrix to the power of an integer .
Accepts
Parameters as specified in source
Produces
A $ray.
Source
+is-close
+is-closeCheck if two arrays are close to each other within a specified tolerance, in absolute or relative terms.
Accepts
Parameters as specified in source
Produces
A $ray.
Source
+any
+anyCheck if any element in an array is loobean false.
Accepts
Parameters as specified in source
Produces
See source for return type details.
Source
+all
+allCheck if all elements in an array are loobean true.
Accepts
Parameters as specified in source
Produces
See source for return type details.
Source
+fun-scalar
+fun-scalarUtility function to process a scalar function.
Accepts
Parameters as specified in source
Produces
A $-([@ @] @) gate.
Source
+trans-scalar
+trans-scalarUtility function to produce a gate for scalar operations.
Accepts
Parameters as specified in source
Produces
A $-(@ @) gate.
Source
+el-wise-op
+el-wise-opUtility function to operate element-wise on an array.
Accepts
Produces
A $ray.
Source
+bin-op
+bin-opUtility function to perform a binary operation on two arrays.
Accepts
Parameters as specified in source
Produces
A $ray.
Source
+ter-op
+ter-opUtility function to perform a ternary operation on three arrays.
Accepts
Parameters as specified in source
Produces
A $ray.
Source
Last updated