cumprod(x: array): array
Cumulative product of array elements.
Computes the cumulative product of elements in an array or matrix along a specified dimension.
Cumulative product of a 1D array
Cumulative product of a 1D array
import { assertEquals } from "jsr:@std/assert"; assertEquals(cumprod([5, 6, 3]), [5, 30, 90]);
x: array
The input array or matrix of values
The cumulative product of the input values
cumprod(x: array,dim: 0,): array
Cumulative product of array elements.
Computes the cumulative product of elements in an array or matrix along a specified dimension.
Cumulative product of a 1D array
Cumulative product of a 1D array
import { assertEquals } from "jsr:@std/assert"; assertEquals(cumprod([5, 6, 3]), [5, 30, 90]);
x: array
The input array or matrix of values
The cumulative product of the input values
cumprod(x: array,dim: 1,): array
Cumulative product of array elements.
Computes the cumulative product of elements in an array or matrix along a specified dimension.
Cumulative product of a 1D array
Cumulative product of a 1D array
import { assertEquals } from "jsr:@std/assert"; assertEquals(cumprod([5, 6, 3]), [5, 30, 90]);
x: array
The input array or matrix of values
The cumulative product of the input values
cumprod(x: matrix,dim: 0,): matrix
Cumulative product of array elements.
Computes the cumulative product of elements in an array or matrix along a specified dimension.
Cumulative product of a 1D array
Cumulative product of a 1D array
import { assertEquals } from "jsr:@std/assert"; assertEquals(cumprod([5, 6, 3]), [5, 30, 90]);
x: matrix
The input array or matrix of values
The cumulative product of the input values
cumprod(x: matrix,dim: 1,): matrix
Cumulative product of array elements.
Computes the cumulative product of elements in an array or matrix along a specified dimension.
Cumulative product of a 1D array
Cumulative product of a 1D array
import { assertEquals } from "jsr:@std/assert"; assertEquals(cumprod([5, 6, 3]), [5, 30, 90]);
x: matrix
The input array or matrix of values
The cumulative product of the input values