trues(n: number): matrix<boolean>
Creates an array filled with true values.
Generates an array or matrix of all true values based on the input dimensions.
Accepts one or two numeric arguments, or an array specifying the dimensions.
Create a 1x1 matrix of true
Create a 1x1 matrix of true
import { assertEquals } from "jsr:@std/assert"; assertEquals(trues(1), [[true]]);
Create a 2x2 matrix of true
Create a 2x2 matrix of true
import { assertEquals } from "jsr:@std/assert"; assertEquals(trues(2), [[true, true], [true, true]]);
matrix<boolean>
A matrix filled with true values.
trues(dims: array): matrix<boolean>
Creates an array filled with true values.
Generates an array or matrix of all true values based on the input dimensions.
Accepts one or two numeric arguments, or an array specifying the dimensions.
Create a 1x1 matrix of true
Create a 1x1 matrix of true
import { assertEquals } from "jsr:@std/assert"; assertEquals(trues(1), [[true]]);
Create a 2x2 matrix of true
Create a 2x2 matrix of true
import { assertEquals } from "jsr:@std/assert"; assertEquals(trues(2), [[true, true], [true, true]]);
dims: array
matrix<boolean>
A matrix filled with true values.
trues(nrows: number,ncols: number,): matrix<boolean>
Creates an array filled with true values.
Generates an array or matrix of all true values based on the input dimensions.
Accepts one or two numeric arguments, or an array specifying the dimensions.
Create a 1x1 matrix of true
Create a 1x1 matrix of true
import { assertEquals } from "jsr:@std/assert"; assertEquals(trues(1), [[true]]);
Create a 2x2 matrix of true
Create a 2x2 matrix of true
import { assertEquals } from "jsr:@std/assert"; assertEquals(trues(2), [[true, true], [true, true]]);
matrix<boolean>
A matrix filled with true values.