Calculates the subtraction of two tensors, which are broadcast together as in NumPy (their shapes are aligned from the right, and axes of length 1 or missing axes are stretched).
The first tensor
The second tensor
const result = Chalkboard.tens.sub([[5, 8], [13, 21]], [[2, 3], [5, 8]]); // Returns [[3, 5], [8, 13]]const broadcast = Chalkboard.tens.sub([10], [[1], [2]]); // Returns [[9], [8]] Copy
const result = Chalkboard.tens.sub([[5, 8], [13, 21]], [[2, 3], [5, 8]]); // Returns [[3, 5], [8, 13]]const broadcast = Chalkboard.tens.sub([10], [[1], [2]]); // Returns [[9], [8]]
Calculates the subtraction of two tensors, which are broadcast together as in NumPy (their shapes are aligned from the right, and axes of length 1 or missing axes are stretched).