Math & Reductions
Compute the Pearson correlation coefficient matrix.
Compute the covariance matrix.
Tensor dot product along specified axes.
dot is exported by deepbox/ndarray.
Element-wise absolute value.
Element-wise inverse cosine.
Element-wise inverse hyperbolic cosine.
Element-wise addition.
Add a scalar value to all elements of a tensor.
Test whether all array elements evaluate to True (non-zero).
Test whether all corresponding elements are close within tolerance.
Test whether any array element evaluates to True (non-zero).
Return indices that would sort the tensor along a given axis.
Test for exact array equality (shape, dtype, and all values).
Element-wise inverse sine.
Element-wise inverse hyperbolic sine.
Element-wise inverse tangent.
Element-wise arctangent of y/x with correct quadrant.
Element-wise inverse hyperbolic tangent.
Element-wise cube root.
Element-wise ceil (round up).
Clip (limit) values in tensor.
Element-wise cosine.
Element-wise hyperbolic cosine.
Cumulative product along axis.
Cumulative sum along axis.
Calculate differences along axis.
Element-wise division.
Element-wise equality.
Element-wise exponential.
Element-wise base-2 exponential.
Element-wise exp(x) - 1.
Element-wise floor (round down).
Element-wise floor division.
Element-wise greater than comparison (a > b).
Element-wise greater than or equal comparison (a >= b).
isclose is exported by deepbox/ndarray.
Element-wise test for finite values (not NaN, not Inf).
Element-wise test for infinity (+Inf or -Inf).
Element-wise test for NaN (Not a Number) values.
Element-wise less than comparison (a < b).
Element-wise less than or equal comparison (a <= b).
Element-wise natural logarithm.
Element-wise log(1 + x).
Element-wise base-2 logarithm.
Element-wise base-10 logarithm.
logicalAnd is exported by deepbox/ndarray.
Element-wise logical NOT.
Element-wise logical OR.
Element-wise logical XOR (exclusive OR).
Maximum value along axis.
Element-wise maximum of two tensors.
Compute the arithmetic mean along the specified axis.
median is exported by deepbox/ndarray.
Minimum value along axis.
Element-wise minimum of two tensors.
Element-wise modulo operation.
Element-wise multiplication.
Multiply all elements of a tensor by a scalar value.
Element-wise negation.
Element-wise inequality (not equal) comparison.
Element-wise power.
Product of array elements along axis.
Element-wise reciprocal.
Element-wise round to nearest integer.
Element-wise reciprocal square root.
Element-wise sign function.
Element-wise sine.
Element-wise hyperbolic sine.
Sort values along a given axis.
Element-wise square root.
Element-wise square.
Standard deviation along axis.
Element-wise subtraction.
Sum reduction.
Element-wise tangent.
Element-wise hyperbolic tangent.
Element-wise truncate (round toward zero).
Variance along axis.
import { add, exp, greater, logicalAnd, mean, mul, sin, sort, std, sum, tensor, where,} from "deepbox/ndarray";const x = tensor([[1, 2], [3, 4]]);const y = tensor([[10, 20], [30, 40]]);console.log(add(x, y).toString());console.log(mul(x, y).toString());console.log(exp(x).toString());console.log(sin(x).toString());console.log(sort(tensor([3, 1, 2])).toString());console.log(logicalAnd(tensor([1, 0, 1]), tensor([1, 1, 0])).toString());console.log(sum(x).toString(), mean(y).toString(), std(y).toString());console.log(where(greater(x, tensor(2)), x, y).toString());