plus(x: number,y: number,): number
Addition X + Y.
Adds two numbers, arrays, or matrices element-wise. Handles mixed inputs of scalars, arrays, and matrices.
Add two arrays element-wise
Add two arrays element-wise
import { assertEquals } from "jsr:@std/assert"; assertEquals(plus([5, 6, 4], [3, -1, 0]), [8, 5, 4]);
Add a number to each element of an array
Add a number to each element of an array
import { assertEquals } from "jsr:@std/assert"; assertEquals(plus([5, 6, 4], 10), [15, 16, 14]);
plus(x: number,y: array,): array
Addition X + Y.
Adds two numbers, arrays, or matrices element-wise. Handles mixed inputs of scalars, arrays, and matrices.
Add two arrays element-wise
Add two arrays element-wise
import { assertEquals } from "jsr:@std/assert"; assertEquals(plus([5, 6, 4], [3, -1, 0]), [8, 5, 4]);
Add a number to each element of an array
Add a number to each element of an array
import { assertEquals } from "jsr:@std/assert"; assertEquals(plus([5, 6, 4], 10), [15, 16, 14]);
y: array
The second operand, can be a number, array, or matrix.
The result of adding x and y.
plus(x: array,y: number,): array
Addition X + Y.
Adds two numbers, arrays, or matrices element-wise. Handles mixed inputs of scalars, arrays, and matrices.
Add two arrays element-wise
Add two arrays element-wise
import { assertEquals } from "jsr:@std/assert"; assertEquals(plus([5, 6, 4], [3, -1, 0]), [8, 5, 4]);
Add a number to each element of an array
Add a number to each element of an array
import { assertEquals } from "jsr:@std/assert"; assertEquals(plus([5, 6, 4], 10), [15, 16, 14]);
x: array
The first operand, can be a number, array, or matrix.
The result of adding x and y.
plus(): array
Addition X + Y.
Adds two numbers, arrays, or matrices element-wise. Handles mixed inputs of scalars, arrays, and matrices.
Add two arrays element-wise
Add two arrays element-wise
import { assertEquals } from "jsr:@std/assert"; assertEquals(plus([5, 6, 4], [3, -1, 0]), [8, 5, 4]);
Add a number to each element of an array
Add a number to each element of an array
import { assertEquals } from "jsr:@std/assert"; assertEquals(plus([5, 6, 4], 10), [15, 16, 14]);
The result of adding x and y.
plus(x: number,y: matrix,): matrix
Addition X + Y.
Adds two numbers, arrays, or matrices element-wise. Handles mixed inputs of scalars, arrays, and matrices.
Add two arrays element-wise
Add two arrays element-wise
import { assertEquals } from "jsr:@std/assert"; assertEquals(plus([5, 6, 4], [3, -1, 0]), [8, 5, 4]);
Add a number to each element of an array
Add a number to each element of an array
import { assertEquals } from "jsr:@std/assert"; assertEquals(plus([5, 6, 4], 10), [15, 16, 14]);
y: matrix
The second operand, can be a number, array, or matrix.
The result of adding x and y.
plus(x: matrix,y: number,): matrix
Addition X + Y.
Adds two numbers, arrays, or matrices element-wise. Handles mixed inputs of scalars, arrays, and matrices.
Add two arrays element-wise
Add two arrays element-wise
import { assertEquals } from "jsr:@std/assert"; assertEquals(plus([5, 6, 4], [3, -1, 0]), [8, 5, 4]);
Add a number to each element of an array
Add a number to each element of an array
import { assertEquals } from "jsr:@std/assert"; assertEquals(plus([5, 6, 4], 10), [15, 16, 14]);
x: matrix
The first operand, can be a number, array, or matrix.
The result of adding x and y.
plus(): matrix
Addition X + Y.
Adds two numbers, arrays, or matrices element-wise. Handles mixed inputs of scalars, arrays, and matrices.
Add two arrays element-wise
Add two arrays element-wise
import { assertEquals } from "jsr:@std/assert"; assertEquals(plus([5, 6, 4], [3, -1, 0]), [8, 5, 4]);
Add a number to each element of an array
Add a number to each element of an array
import { assertEquals } from "jsr:@std/assert"; assertEquals(plus([5, 6, 4], 10), [15, 16, 14]);
The result of adding x and y.