Builtin Index
Every function the engine will answer to, with a line saying what it does and where it is documented properly.
The names come from the interpreter's own dispatch table, so this page cannot claim a function the engine lacks or omit one it has. The descriptions come from the chapters, joined on the name -- so a description is written in exactly one place, the chapter that teaches the subject, and this page is a view onto it rather than a second copy that can drift.
1360 builtins, 1275 described. The rest are listed at the end, by name: a gap you can see is worth more than one quietly omitted.
apropos("filter") searches these names from inside a running program, and a misspelled call suggests the nearest match.
A
ablation_study | Computes one importance score per feature column of an N-row, D-column X and length-N y, using cv_folds folds (integer, default 3): the full model's cross-validated score minus.. | Statistics & ML |
abs | Absolute value on a real scalar/Vec/Mat; magnitude (sqrt(re^2 + im^2)) on a Complex scalar, CVec, or CMat | Core maths |
acf | Returns a vector of length max_lag+1 (lag 0 through max_lag), the autocorrelation function | Signal processing |
acos | Inverse trigonometric functions, single-argument only (the two-argument form is atan2, below) | Core maths |
acosh | Inverse hyperbolics. asinh is defined and finite on the whole real line | Core maths |
adadelta | Per-parameter learning rates derived from the running gradient history, given params (a Tensor to optimize) and lr (a number, default 0.001) | Statistics & ML |
adagrad | Per-parameter learning rates derived from the running gradient history, given params (a Tensor to optimize) and lr (a number, default 0.001) | Statistics & ML |
adam | The Adam family of per-parameter adaptive-learning-rate optimizers, given params (a Tensor to optimize) and a learning rate lr (a number, default 0.001) | Statistics & ML |
adamax | The Adam family of per-parameter adaptive-learning-rate optimizers, given params (a Tensor to optimize) and a learning rate lr (a number, default 0.001) | Statistics & ML |
adamw | The Adam family of per-parameter adaptive-learning-rate optimizers, given params (a Tensor to optimize) and a learning rate lr (a number, default 0.001) | Statistics & ML |
adaptive_threshold | Locally adaptive, unlike threshold/otsu above: each pixel's own threshold is mean(neighborhood) - offset, where the neighborhood mean is a uniform box average (method="mean") or a.. | Images |
adc | Quantises x (a length-N number vector) the way a converter does — with a reference range, not just a step size, so a signal outside [vmin, vmax] clips instead of being quantised as if.. | Noise |
add | The operators as named functions, so an operation can be passed where a name is what you can pass | Core maths |
add_edge | Nodes are named; an edge carries an optional weight, defaulting to 1 | Collections & strings |
add_marker | Added in v0.2.4. Annotates an instant — an impact, a fault injection — at time seconds on the signal's own (origin-aware) axis | Signal processing |
add_node | Nodes are named; an edge carries an optional weight, defaulting to 1 | Collections & strings |
add_noise | Adds noise of the named kind (a string — see the kinds table near the top of this chapter) to x, a length-N number vector or an Image (noise is added per-pixel, per-channel) | Noise |
add_region | Added in v0.2.4. Annotates an interval rather than an instant | Signal processing |
affine_identity | Returns the 3x3 identity Mat — a no-op transform, useful as a composition base case | Images |
affine_rotate | Returns a new 3x3 Mat encoding a CCW rotation matrix in standard math convention (see the clockwise-on-screen note above for the visual difference from imrotate) | Images |
affine_scale | Builds a scaling transform for imwarp | Images |
affine_shear | Returns a new 3x3 Mat encoding that shear | Images |
affine_translate | Returns a new 3x3 homogeneous-coordinate Mat encoding that translation | Images |
after | after returns the piece of s past the first mark; before returns the piece up to it | Collections & strings |
after_last | Returns a Str: like after/before but searching from the end — the pair to reach for on a path or a dotted name | Collections & strings |
algorigram | Renders a flowchart of the named function's control flow: if/else as a decision diamond with yes/no branches that rejoin, while/for/do...loop as a decision with a routed.. | Plotting |
all | With ONE argument, any(mask) / all(mask) take a boolean mask or numeric Vec/Mat and return whether any / every element is true (non-zero) — any(x > 3); an empty mask is false.. | Collections & strings |
allpass | Returns a Model (kind "filter", field sos, one section) | Signal processing |
and | Returns a bool. Both short-circuit: the right side is not evaluated when the left already decides the answer, so i < len(xs) and xs[i] > 0 is a safe guard | Collections & strings |
angle | Complex argument — the angle from the positive real axis, in radians (atan2(im, re)) — on a Complex/CVec/CMat; on a signed real scalar or real Vec/Mat it degrades to 0 for a.. | Core maths |
animate | Calls function "fn" (string) once per frame index from 0 to frames - 1 (integer) and writes the sequence to path (string) as one animated SVG, no JavaScript | Plotting |
annotate | Same as text — label text (string) at (x, y) (numbers, data units) — but also draws a marker dot at that point | Plotting |
any | With ONE argument, any(mask) / all(mask) take a boolean mask or numeric Vec/Mat and return whether any / every element is true (non-zero) — any(x > 3); an empty mask is false.. | Collections & strings |
append | Returns a NEW Vec/List with value added at the end | Collections & strings |
append_all | Appends s to the end of the file at path, creating it if absent | Collections & strings |
append_text | Appends s to the end of the file at path, creating it if absent | Collections & strings |
apply | Returns the SAME container type and shape as x (a Signal(xs, fs) comes back as a new Signal at the same fs, a vector/matrix keeps its own shape, a bare number/boolean applies the.. | Signal processing |
apply_calibration | Added in v0.2.4. The general linear calibration physical = slope*raw + offset that the two calibrate forms are specific instances of | Signal processing |
apply_calibration_curve | Added in v0.2.4. A non-linear calibration: a lookup table from raw reading to physical value, interpolated piecewise-linearly — what a thermocouple or a certificated load cell actually.. | Signal processing |
apply_gain | Added in v0.2.4. Multiplies every sample by a linear gain factor and composes it into the calibration record, so a calibrated signal stays calibrated and its level rises accordingly | Signal processing |
apply_offset | Added in v0.2.4. Adds a constant to every sample (a DC trim, a tare), composed into the calibration record like any other linear step | Signal processing |
apropos | Returns a List of strings: every builtin name containing that substring, in engine-registration order | REPL & diagnostics |
ar_model | Fits an autoregressive AR(p) model by Yule-Walker to a length-N numeric vector x, using the integer lag order order (this is p) | Statistics & ML |
arc | Draws part of a circle, as an open stroke | Plotting |
area | Filled area under the curve (x, y) (equal-length numeric Vecs) down to y=0; the zero-baseline special case of fill_between | Plotting |
arg | Complex argument — the angle from the positive real axis, in radians (atan2(im, re)) — on a Complex/CVec/CMat; on a signed real scalar or real Vec/Mat it degrades to 0 for a.. | Core maths |
argmax | 0-based index of the first-occurring minimum/maximum element of x (a scalar, Vec, or Mat/Signal, flattened) | Core maths |
argmean | Index into x (a Vec or flattened Mat/Signal) of the element closest to mean(x) (ties broken by first occurrence) — not a true order-statistic index like the others above, since.. | Core maths |
argmedian | Index into x (a Vec or flattened Mat/Signal) of the element sitting at the median position | Core maths |
argmin | 0-based index of the first-occurring minimum/maximum element of x (a scalar, Vec, or Mat/Signal, flattened) | Core maths |
argquantile | Index into x (a Vec or flattened Mat/Signal) nearest the q-quantile rank, computed as round(q*(n-1)) where n = len(x); q is a scalar in [0, 1] | Core maths |
argsort | Returns a Vec of number (0-based indices): the permutation that would sort x — the index-returning sibling of sort, same convention as argmin/argmax | Collections & strings |
argv | Returns a list of strings: the command-line arguments given after a literal -- in the invocation (e.g. qu run analyse.qu -- data.csv 1000 gives ("data.csv", "1000")) | File I/O |
arima | Fits an ARIMA(p, d, q) model to a length-N numeric vector x: d (integer, default 0) rounds of differencing, then an ARMA fit with p (integer, default 1) autoregressive lags.. | Statistics & ML |
arrow | Draws an arrow from (x0, y0) to (x1, y1) (numbers, data units), no label | Plotting |
arrowtext | Same as arrow — from (x0, y0) to (x1, y1) (numbers, data units) — but the arrowhead ends in a point labeled with text (string) | Plotting |
as_text | Returns a List of Str (each element formatted the way print would), so [1, 2, 3].as_text().join(", ") works | Collections & strings |
asc | Returns a number: the code point of its first character | Collections & strings |
asin | Inverse trigonometric functions, single-argument only (the two-argument form is atan2, below) | Core maths |
asinh | Inverse hyperbolics. asinh is defined and finite on the whole real line | Core maths |
astar_mrmr | A guided (A*) search on an N-row, D-column X and length-N y for a feature subset of size n_features (integer) that is relevant to the target and not redundant with itself.. | Statistics & ML |
at | Returns a Record: one row of the table by position, always positional even when the table carries a string index | Collections & strings |
atan | Inverse trigonometric functions, single-argument only (the two-argument form is atan2, below) | Core maths |
atan2 | Four-quadrant arctangent in radians, (-π, π]: the angle of the point (x, y), so atan2(1, -1) is 3π/4 where atan(1/-1) would say -π/4 | Core maths |
atanh | Inverse hyperbolics. asinh is defined and finite on the whole real line | Core maths |
available | Returns an integer: bytes waiting on the OS's serial input buffer right now, without blocking | Concurrency |
avgpool2d | Downsamples an (H, W) matrix x the same way as maxpool2d — size x size windows, stride defaulting to size — but takes the mean of each window instead of the max | Statistics & ML |
B
band_power | Returns the power in that frequency band by Parseval, normalised by N^2 so a tone of amplitude A reads A^2/2 | Signal processing |
band_zero | Returns a new spectrum at the same Fs, N and scaling with that band cleared — an ideal brick-wall notch | Signal processing |
bandwidth | The bandwidth of A as a record {lower, upper}: how far from the main diagonal the farthest nonzero lies below and above it ({lower: 1, upper: 1} for a tridiagonal matrix, {lower: 2,.. | Core maths |
bar | Bar chart: x (Vec of numbers or strings, category positions/labels) and y (Vec of numbers, bar heights) must be equal length | Plotting |
basin_hopping | Returns a Model (kind "minimize", same fields as minimize) | Signal processing |
beamform | Delay-and-sum beamformer. signals: a list of Signals, one per array element, all at the same Fs and the same length; positions: a matching-length vector of element coordinates.. | Signal processing |
beeswarm | Every sample drawn, nudged sideways only as far as it must be to clear its neighbours, so the WIDTH is the count | Plotting |
before | after returns the piece of s past the first mark; before returns the piece up to it | Collections & strings |
before_last | Returns a Str: like after/before but searching from the end — the pair to reach for on a path or a dotted name | Collections & strings |
berncdf | Cumulative Bernoulli distribution P(X <= k), a step function of floor(k) | Statistics & ML |
bernfit | Maximum-likelihood fit: a result with the named parameters p, plus .params (the same as a vector), .n and .loglik (the log-likelihood at the estimate) | Statistics & ML |
berninv | Inverse of berncdf: the smallest support point whose CDF reaches p (so berninv(berncdf(k, ...), ...) is k), for p in [0, 1] (outside is an error) | Statistics & ML |
bernpdf | Probability mass of the Bernoulli distribution at k (a number, vector or matrix, elementwise); zero at a non-integer or out-of-support k | Statistics & ML |
bernrnd | Random draws from the Bernoulli distribution | Statistics & ML |
bernstat | Mean and variance of the Bernoulli distribution with these parameters, as a result with fields .mean and .var | Statistics & ML |
bessel | Returns a Model (kind "filter", field sos) | Signal processing |
besseli | Modified Bessel function of the first kind I_nu(x) of real order nu (|nu| <= 1e6) and real x, same argument shapes and methods as besselj (computed scaled by e^-x and unscaled.. | Core maths |
besselj | Bessel function of the first kind J_nu(x) of real order nu and real argument x; nu and x are numbers or same-shape Vec/Mats (a number pairs with every element) | Core maths |
besselk | Modified Bessel function of the second kind K_nu(x) of real order nu (|nu| <= 1e6, K_{-nu} = K_nu) and x > 0, same argument shapes and methods as besselj (computed scaled by.. | Core maths |
bessely | Bessel function of the second kind Y_nu(x) for real order nu (|nu| <= 1e6) and x > 0, same argument shapes, methods and accuracy as besselj (median 2e-16 and 99% within 1e-12.. | Core maths |
beta | The beta function B(a, b) = Γ(a) Γ(b) / Γ(a + b) for a, b > 0, elementwise (number, or same-shape Vec/Mats) | Core maths |
betacdf | Beta cumulative distribution on [0, 1] -- the regularized incomplete beta function I_x(a, b) | Statistics & ML |
betafit | Maximum-likelihood fit: a result with the named parameters a, b, plus .params (the same as a vector), .n and .loglik (the log-likelihood at the estimate) | Statistics & ML |
betainc | Regularized incomplete beta function I_x(a, b) for 0 <= x <= 1, a, b > 0: betainc(x, 1, 1) = x and betainc(x, a, b) = 1 - betainc(1 - x, b, a) | Core maths |
betainv | Inverse of betacdf. Returns the same shape as p, in [0, 1] | Statistics & ML |
betapdf | Beta probability density. Returns the same shape as x | Statistics & ML |
betarnd | Random draws from the beta distribution | Statistics & ML |
betastat | Mean and variance of the beta distribution with these parameters, as a result with fields .mean and .var | Statistics & ML |
bin2dec | Reads a binary digit string as a number | Collections & strings |
binocdf | Cumulative binomial distribution P(X <= k), a step function of floor(k) | Statistics & ML |
binofit | Maximum-likelihood fit: a result with the named parameters p, plus .params (the same as a vector), .n and .loglik (the log-likelihood at the estimate) | Statistics & ML |
binoinv | Inverse of binocdf: the smallest support point whose CDF reaches p (so binoinv(binocdf(k, ...), ...) is k), for p in [0, 1] (outside is an error) | Statistics & ML |
binomial | Exact binomial draws. n_trials (a positive integer) is how many trials each draw counts successes over; p (a number in [0, 1]) is the success probability of one trial; rows and.. | Statistics & ML |
binopdf | Probability mass of the binomial distribution at k (a number, vector or matrix, elementwise); zero at a non-integer or out-of-support k | Statistics & ML |
binornd | Random draws from the binomial distribution | Statistics & ML |
binostat | Mean and variance of the binomial distribution with these parameters, as a result with fields .mean and .var | Statistics & ML |
bitand | Returns a number: the bitwise AND of a and b as 64-bit integers | Collections & strings |
bitcmp | Returns a number: the bitwise complement (!a) as a 64-bit integer | Collections & strings |
bitor | Returns a number: the bitwise OR | Collections & strings |
bitshift | Shifts an integer's bits left or right | Collections & strings |
bitxor | Returns a number: the bitwise XOR | Collections & strings |
blackman | Returns a length-n real vector | Signal processing |
blob_stats | Per-region area, centroid and bounding box, from a labelled image (identical operation to regionprops above) | Images |
block_process | Cuts x into consecutive blocks, calls f on each, and concatenates the results | Signal processing |
blocks | Returns a list of blocks, so for b in s.blocks(4096) iterates it with the ordinary for loop | Signal processing |
blur | Applies a fixed 3x3 box-average blur kernel | Images |
blur_backdrop | Figure-level (not per-panel) depth-of-field effect: (x0,y0)–(x1,y1) (numbers, fractions 0..1 of the whole rendered canvas) name the rectangle that stays sharp; everything else is.. | Plotting |
bode | Draws a complete two-panel Bode figure — magnitude in dB above, phase in degrees below, both against a log frequency axis — and returns Nothing | Signal processing |
bode_magnitude | Magnitude half of a Bode plot: 20*log10(|Z|) vs. log-scaled frequency | Signal processing |
bode_phase | Phase half of a Bode plot: arg(Z) in degrees vs. log-scaled frequency | Signal processing |
box | Toggles the panel's bounding box | Plotting |
boxplot | One group per argument (each a Vec of numbers), placed at x = 0, 1, 2, ...; draws a Tukey five-number summary (min/Q1/median/Q3/max plus outliers) per group as a box-and-whisker | Plotting |
bubble | Scatter where marker radius encodes a third variable: x, y, sizes are equal-length numeric Vecs; the drawn radius is scaled from sizes's own min/max | Plotting |
builtins | Returns a List of strings: every name the engine answers to (hundreds of entries; the exact count grows as builtins are added) | REPL & diagnostics |
butter | Returns a Model (kind "filter", field sos) | Signal processing |
buttord | Returns a record {order, wn, kind}: the lowest Butterworth order meeting the specification, the -3 dB frequency to design it with (Hz; a number, or [low, high]) and the band shape as.. | Signal processing |
bvp | Solves the two-point boundary value problem y' = f(x, y) with boundary conditions bc(y(a), y(b)) = 0 for a = x[0], b = x[end] | Signal processing |
bvp_eval | Evaluates a bvp solution at the query point(s) xq (a number or a vector) with the cubic Hermite interpolant that the residual estimate is based on, so it is as accurate as the solution.. | Signal processing |
bwareaopen | Labels internally (8-connectivity, matching MATLAB's default) and zeroes out every blob whose pixel count is below min_area | Images |
bwlabel | Connected-component labeling. Returns a Model (kind "blobs") with fields .labels (a Mat of the same height/width as binary_img, integer label ids, background = 0), .count (a.. | Images |
C
calibrate | Added in v0.2.4. Turns a raw Signal into a physically calibrated one, scaling the samples and stamping the resulting unit | Signal processing |
capacitor | 1/(jwC) | Signal processing |
capitalize | Uppercases the first character, leaves the rest untouched | Collections & strings |
capture | Runs the named drawing function "fn" (string, a function you defined) into a scratch panel, passing along any further positional args..., and keeps what it drew as a value (a "layer") | Plotting |
cast | Returns a value of that kind. A conversion that is not defined is an error, not a best effort | Collections & strings |
cat | MATLAB-style concatenation: dim (a scalar, 1 or 2) selects the axis, then the 2+ remaining arguments (same shape rules as hstack/vstack) are joined along it — dim=1 vertical.. | Core maths |
cbrt | Real cube root, elementwise — unlike x^(1/3), correctly handles a negative x (cbrt(-8) = -2, not NaN) | Core maths |
cd | Changes the working directory to path (a Str) for the whole process, so every later relative path in the script resolves from there | File I/O |
ceil | Standard rounding functions, elementwise: floor toward negative infinity, ceil toward positive infinity, round to the nearest integer (half away from zero) | Core maths |
channel | Creates a new, empty channel. Returns a Channel handle (type(ch) == "channel"); cloning it shares the same underlying queue, not a separate copy | Concurrency |
channel_len | How many messages are queued right now on channel ch, without consuming any of them | Concurrency |
channel_recv | Blocks the calling thread until a value is available on channel ch, then pops and returns it (FIFO — oldest channel_sendd value first) | Concurrency |
channel_send | Pushes value (any value, any type) onto channel ch's queue and wakes one waiting channel_recv | Concurrency |
channel_try_recv | Non-blocking counterpart to channel_recv: returns none (Nothing) immediately if nothing is queued on channel ch right now, instead of waiting; otherwise pops and returns the next.. | Concurrency |
chars | Returns a List of one-character Strs | Collections & strings |
cheb1ord | Same arguments and record as buttord, for cheby1(r.order, rp, r.kind, r.wn, fs) | Signal processing |
cheb2ord | Same arguments and record as buttord, for cheby2(r.order, rs, r.kind, r.wn, fs) | Signal processing |
chebdiff | Chebyshev spectral differentiation (the cheb of Trefethen's *Spectral Methods in MATLAB*) | Signal processing |
cheby1 | Returns a Model (kind "filter", field sos) | Signal processing |
cheby2 | Returns a Model (kind "filter", field sos) | Signal processing |
check_grads | Verifies the analytic reverse-mode gradient of scalar-valued f at x against central finite differences of f itself — an independent route to the same number, which is the point: a.. | REPL & diagnostics |
chi2cdf | Chi-square cumulative distribution P(X <= x) at x (a number or vector, elementwise) with k degrees of freedom | Statistics & ML |
chi2inv | Inverse of chi2cdf: the chi-square critical value with k degrees of freedom, chi2inv(0.95, 1) = 3.841 | Statistics & ML |
chi2pdf | Chi-square probability density at x (a number or vector, elementwise) with k degrees of freedom (a positive number), computed in log space so it survives modest k without overflowing | Statistics & ML |
chi2rnd | Random draws from the chi-square distribution | Statistics & ML |
chi2stat | Mean and variance of the chi-square distribution with these parameters, as a result with fields .mean and .var | Statistics & ML |
chirp | Identical to sweep above — same four positional arguments (start frequency, end frequency, sample rate, sample count) and the same method= (string, "linear" default or.. | Plotting |
chisquare | Draws from the chi-square distribution with k degrees of freedom (a positive integer), same rows/cols/seed= shape as rand | Statistics & ML |
chol | Lower-triangular Cholesky factor L of A = L·Lᵀ, where A is a symmetric positive-definite n×n Mat; errors clearly if A isn't positive-definite | Core maths |
chr | Returns a one-character Str from chr, and a number — the code point — from ord | Collections & strings |
circle | Draws a circle centered at (cx, cy) (numbers, data units) with radius r (number, data units) | Plotting |
circuit | Builds a circuit from a spec string and a flat parameter vector | Signal processing |
circuit_fit | Nonlinear least-squares fit of a circuit's parameters to measured impedance | Signal processing |
clahe | Contrast-Limited Adaptive Histogram Equalization: imequalize's tile-based local counterpart, with a clipped per-tile histogram (clip threshold clip_limit * tile_pixel_count / 256) and —.. | Images |
clamp | Elementwise clamp of x (a scalar, Vec, or Mat/Signal) into [lo, hi] | Core maths |
clip | Elementwise clamp of x (a scalar, Vec, or Mat/Signal) into [lo, hi] | Core maths |
close | Flushes and releases a file handle | File I/O |
cm | Length units as functions, converting a scalar v (millimetres/centimetres/inches/points as named) to the figure's own coordinate space — a tenth of a millimetre, so mm(1) is 10,.. | Core maths |
cmyk | Builds a colour from the printer's subtractive space: cyan c, magenta m, yellow y, key/black k, each a number 0–1 | Plotting |
coherence | Returns a single number: the largest inner product between any two different normalised columns of A | Noise |
colorbar | Accepted, with or without a [extend=]-style argument in the function form (so MATLAB-style scripts parse) but currently a documented no-op in both forms — no colorbar is actually drawn | Plotting |
colormap | Sets the current panel's categorical/sequential palette to name (string — see the Markers & Styling reference below for the full list) | Plotting |
cols | Row / column count of A. On a Vec (shape (n, 1)), a Mat/Signal (shape (r, c)), or a bare scalar (shape (1, 1)), returns the corresponding dimension as a scalar Num | Core maths |
compare | Returns a number: −1, 0 or 1, so it can drive a sort directly | Collections & strings |
compile | Attaches an optimizer Record (from sgd/adam/etc., default adam()) and a loss name string ("mse" or "cross_entropy", default "mse") to an input(n) |> dense(...) |> ..... | Statistics & ML |
complex | Returns a Complex. 3 + 4j is the literal form; this is for computed components | Collections & strings |
cond | The 2-norm condition number of A (an r×c Mat or CMat) — the ratio of its largest to smallest singular value | Core maths |
confusion_matrix | Draws a confusion-matrix heatmap comparing a length-N vector of true labels actual against a length-N vector of predicted labels predicted, over an optional integer n_classes.. | Statistics & ML |
conj | Complex conjugate (negates the imaginary part); passes a real x through unchanged | Core maths |
contains | Returns a bool: membership test via structural equality | Collections & strings |
contour | Iso-lines through scalar field Z (a Mat with len(y) rows and len(x) columns) over axis vectors x, y (Vecs of numbers); contourf fills the bands between levels instead of only.. | Plotting |
contourf | Iso-lines through scalar field Z (a Mat with len(y) rows and len(x) columns) over axis vectors x, y (Vecs of numbers); contourf fills the bands between levels instead of only.. | Plotting |
conv | Returns a vector of the length implied by mode | Signal processing |
conv1d | Slides a length-K learnable kernel vector over a length-N signal x, moving stride positions at a time (integer, default 1) with padding ("valid" — no padding, output shrinks —.. | Statistics & ML |
conv2d | Slides a (Kh, Kw) learnable kernel matrix over an (H, W) image matrix x, moving stride positions at a time (integer, default 1) with padding — "valid" (no padding) or "same".. | Statistics & ML |
convert_unit | Added in v0.2.4. Rescales the samples into another unit of the same physical quantity and moves the unit tag with them, so the two cannot disagree; a calibration's dB reference is.. | Signal processing |
copy_file | Copies src to dst, leaving the original in place | File I/O |
corr | Pearson correlation between two length-N numeric vectors x and y | Statistics & ML |
corr_heatmap | Computes the pairwise Pearson correlation of Table t's numeric columns | Plotting |
corrcoef | Called on an N-row, D-column matrix or table M, returns the full (D, D) matrix of pairwise Pearson correlations between its columns | Statistics & ML |
corrmat | Computes the pairwise Pearson correlation of Table t's numeric columns | Plotting |
corrplot | Computes the pairwise Pearson correlation of Table t's numeric columns | Plotting |
cos | Standard trigonometric functions, computed elementwise | Core maths |
cosh | Hyperbolic sine/cosine/tangent, elementwise | Core maths |
coth | The other three hyperbolics: coth(x) = cosh(x)/sinh(x), sech(x) = 1/cosh(x), csch(x) = 1/sinh(x) | Core maths |
count | Returns a number: how many non-overlapping times sub occurs in s (non-overlapping so it agrees with replace) | Collections & strings |
cov | Sample covariance between two length-N numeric vectors x and y, N-1 denominator — the same convention var and std use | Statistics & ML |
cpe | 1/(Q (jw)^n) — constant-phase element | Signal processing |
cqt | Constant-Q transform: log-spaced bins sharing one Q = f/bandwidth, so a musical interval spans the same number of bins at every pitch | Signal processing |
crc | Textbook unreflected, zero-initialized polynomial division: the message is shifted left by the CRC width and divided mod 2 | Signal processing |
crc32 | Returns the standard CRC-32 (IEEE 802.3, reflected, initial value and final XOR 0xFFFFFFFF) as a number: crc32("123456789") is 3421780262, i.e. 0xCBF43926 | Collections & strings |
crc_check | Divides the whole codeword and reports whether the remainder is all zeros | Signal processing |
create_file | make_file with a collision policy: "error" (default) refuses if path already exists, "overwrite" truncates it like make_file does unconditionally, "skip" does nothing and.. | File I/O |
crest_factor | peak(x) / rms(x), a dimensionless ratio (a sine wave's is sqrt(2) ≈ 1.414) — the same quantity sinad_estimate(bits, crest_factor) takes as its second argument | Core maths |
crop | Extracts that sub-rectangle. Returns a new Image of exactly width x height pixels | Images |
cross | Cross product of two 3-element vectors, returned as a Vec: cross([1, 0, 0], [0, 1, 0]) is [0, 0, 1] | Core maths |
cross_val | k-fold cross-validation of anything that fits a model | Statistics & ML |
cs_guarantee | Returns a single number: the largest sparsity level that the matrix's coherence alone can *prove* recoverable | Noise |
cs_recover | Compressed-sensing reconstruction of a sparse vector x from an M×N sensing matrix A and a length-M measurement vector y | Noise |
csch | The other three hyperbolics: coth(x) = cosh(x)/sinh(x), sech(x) = 1/cosh(x), csch(x) = 1/sinh(x) | Core maths |
csd | Returns a length-nperseg/2 + 1 complex vector (CVec), the one-sided cross-spectral density Pxy — Welch's method, sharing welch's own framing/windowing/averaging exactly, so it lines.. | Signal processing |
csv2json | Not jsonify(parse_csv(str)) — it emits a plain JSON array of one flat {"col": value, ...} object per row (the natural shape for feeding to another JSON-consuming tool), rather than.. | File I/O |
csv2xml | str (string, CSV text) is converted to XML: exactly xmlify(parse_csv(str)). Returns a string | File I/O |
csvify | Converts table (Table) to CSV text — exactly write_csv's own formatting (Table::to_csv), just returned as a string instead of written to a file | File I/O |
ctranspose | Conjugate transpose (Hermitian): transpose plus elementwise complex conjugation | Core maths |
cumprod | Running product, same type/length as x (cumprod([1, 2, 3, 4]) is [1, 2, 6, 24]); a Signal stays a Signal; a Mat is read column-major and comes back as a Vec, exactly like.. | Core maths |
cumsum | Returns the running sum, same type/length as x; a Signal input stays a Signal with the same Fs | Collections & strings |
cumtrapz | Running trapezoid integral: the result has the shape of y, starts at 0, and its last element equals trapz | Signal processing |
cur_dir | cur_dir says what it gives back and pwd is what anyone who has used a shell types first, so both spellings exist rather than one being renamed out from under existing scripts | File I/O |
curve_fit | Returns a Model (kind "curve_fit") with fields params (a length-P vector), cost (a number, residual sum of squares), converged (a boolean) | Signal processing |
cut | Returns a new Signal at the SAME Fs, shorter than sig | Signal processing |
cv_stability | Repeats cross-validation n_repeats times (integer, default 10) with cv_folds folds each (integer, default 5) on an N-row X and length-N y, reshuffling between repeats | Statistics & ML |
cwt | Continuous wavelet transform: one column per input sample, with no framing and no decimation — unlike dwt, which halves its length at every level and visits only dyadic scales | Signal processing |
D
daily_profile | Returns a length-7 real vector, one bin per day-of-week -- so a weekday-against-weekend difference separates out | Signal processing |
db | Alias of mag2db(x) above (20*log10(x), amplitude convention) — the bare SciPy/general-DSP-flavored spelling | Signal processing |
db2mag | Returns the same shape: 10^(db/20) — inverse of mag2db | Signal processing |
db2pow | Returns the same shape: 10^(db/10) — inverse of pow2db/db_power | Signal processing |
db_power | Alias of pow2db(x) above (10*log10(x), power convention) — the bare SciPy/general-DSP-flavored spelling | Signal processing |
dbfs | Peak level relative to full scale: 20*log10(peak(abs(x)) / full_scale) | Core maths |
dbscan | Density-based clustering on an N-row, D-column data matrix X: a number eps (the neighbourhood radius, in X's own units) and an integer min_samples (the minimum neighbourhood.. | Statistics & ML |
dct | Returns a length-N real vector | Signal processing |
dec2bin | Returns a Str of 0/1 digits, no prefix | Collections & strings |
dec2hex | Returns a Str: uppercase hex digits, no prefix | Collections & strings |
decode_can | Added in v0.3.0. bus: one Digital value — the differential pair has already been resolved to a logic level by the transceiver or by the scope's own threshold | Signal processing |
decode_i2c | Added in v0.3.0. scl, sda: two Digital values from to_digital, clock first, data second — I2C framing is defined by SDA moving while SCL is held high, so neither wire decodes alone.. | Signal processing |
decode_spi | Decodes clocked SPI traffic into bytes, sampling each data line at whichever clock edge CPOL and CPHA select | Signal processing |
decode_uart | Decodes asynchronous serial frames into bytes at a stated bit rate | Signal processing |
deconv | Polynomial long division of the real coefficient Vec b by a (highest power first, the inverse of conv): returns the record {q, r} with conv(a, q) + r == b | Statistics & ML |
delay | Returns the SAME length as x, shifted later by n with the vacated head zero-filled and whatever runs off the end dropped | Signal processing |
delta_e | Compares colours a and b (each any accepted colour string) in CIE76 Lab space and returns a single number: the perceptual distance | Plotting |
dense | One fully-connected layer on an N-row, D-column input matrix x, a (D, H) weight matrix w, and a length-H bias vector b: computes x * w + b, broadcasting b over every row | Statistics & ML |
dense_layer | Builds one unfitted dense-layer spec: in_dim/out_dim (positive integers) the layer's input and output widths, activation a string, "relu" or "none" (default "none", a bare.. | Statistics & ML |
describe | Pandas-style describe(): returns a Table with one row per summary statistic (count, mean, std, min, 25%, 50%, 75%, max) and one column per NUMERIC column of df (text.. | Collections & strings |
det | Determinant of a square Mat or CMat, via LU decomposition | Core maths |
detect_saturation | Has x hit the rails of an adc_bits-bit converter: the clipping question for a converter whose range is *known* rather than inferred, so no flat run is required and a single sample.. | Signal processing |
detrend | Subtracts a least-squares polynomial trend from x, a length-N number vector | Noise |
device_used | Returns a struct-like value with two fields: .device (a string, e.g. "cpu" or a GPU device name) and .gpu_dispatches (a number, the count of operations actually dispatched to the GPU) | REPL & diagnostics |
dft | Returns a length-N CVec. The direct, textbook O(n²) transform, kept as an independent reference implementation to validate fft against and as the definitional basis goertzel.. | Signal processing |
diag | Overloaded on argument type: diag(M), where M is an r×c Mat, returns its main diagonal as a length-min(r,c) Vec; diag(v), where v is a length-n Vec (or scalar/other.. | Core maths |
diagram_pipeline | Renders a |> pipe chain as a left-to-right chain of labeled boxes, one per stage | Plotting |
dict | Returns a Dict, insertion-ordered | Collections & strings |
diff | Returns the first difference (x[i+1] - x[i]), length N-1, same base type as x; a Signal input stays a Signal with the same Fs | Collections & strings |
diff_lines | A line diff of two texts. a and b are each a List of strings, or one string that is split into lines (CRLF or LF) | Collections & strings |
dir | The bare names inside path (a Str), sorted — "a.qu", not "tools/a.qu" | File I/O |
dir_exists | Whether path (a Str) exists and is a regular file / a directory | File I/O |
disk | Builds a disk-shaped structuring-element mask Image: a (2*radius+1) x (2*radius+1) binary mask, foreground wherever dx*dx + dy*dy <= radius*radius relative to its own center pixel | Images |
disp | Writes its arguments, space-separated, and a newline, to stdout | Collections & strings |
distinct | Returns the same type: the unique values, in the order they first appear — which unique does not promise, since it sorts | Collections & strings |
distort | Put the signal through a nonlinearity: clip, soft, crossover, harmonic, quantize | Noise |
div | The operators as named functions, so an operation can be passed where a name is what you can pass | Core maths |
dominant_frequency | Returns a single number: the frequency of the largest non-DC bin in x's one-sided spectrum, accurate to the bin's own resolution fs/N | Signal processing |
donut | Pie chart with a hollow center | Plotting |
dot | Dot product of two equal-length vectors a, b (each a Vec; a length mismatch errors) | Core maths |
double_buffer | Returns a double_buffer handle; front AND back both start equal to initial | Collections & strings |
downsample | Lowers the sample rate by an integer factor, anti-aliasing first: applies a lowpass at the new Nyquist (fs/(2*M), at the input rate) and only then keeps every Mth sample | Signal processing |
draw_arrow | A zero-length shaft draws only the (single-point) shaft, with no head, since it has no defined direction | Images |
draw_circle | filled=true fills the digital disk (every pixel with dx^2+dy^2 <= radius^2); filled=false (default) strokes the boundary using the textbook midpoint (Bresenham) circle algorithm at.. | Images |
draw_line | Returns a new Image, same dimensions as img | Images |
draw_rect | filled=true paints the whole interior (thickness is ignored — a fill has no stroke width); filled=false (default) strokes the four edges with the given thickness | Images |
draw_scale_bar | Draws a horizontal bar whose PIXEL length is length_physical / pixel_size, rounded to the nearest pixel — reusing image.regions's own pixel_size=/unit= convention exactly: omitting.. | Images |
drop | Returns the same type as xs: the first n elements (take) or everything after them (drop) | Collections & strings |
drop_row | Returns a Table without those rows, by position | Collections & strings |
dropout | Zeroes a random share of the entries of x (a vector or matrix of any shape) at probability rate (a number in [0, 1)), and scales the surviving entries up by 1 / (1 - rate), so the.. | Statistics & ML |
dropout_layer | Builds one unfitted dropout-layer spec for use inside a sequential stack: rate a number in [0, 1), the fraction of activations to zero during training | Statistics & ML |
duty_cycle | Returns a single number: mean high time over mean period, as a fraction in [0, 1], not a percentage — multiply by 100 for the figure a scope's front panel shows | Signal processing |
dwt | Returns a (2, N/2) matrix — row 0 is the approximation band, row 1 is the detail band (Qu has no multi-return) | Signal processing |
E
ecdf | Empirical cumulative distribution, one staircase per argument | Plotting |
echo | Writes its arguments, space-separated, and a newline, to stdout | Collections & strings |
eda | One-call exploratory overview: a correlation heatmap in the first grid cell, plus one histogram per numeric column in the remaining cells, auto-gridded (ceil(sqrt(n)) columns for n.. | Plotting |
edge_detect | Applies a fixed 3x3 discrete Laplacian edge filter, highlighting intensity discontinuities | Images |
edges | Same hysteresis as find_edges, same return shape (a Model, kind "edges", with indices/directions/positions/rising/falling/count) — d.edges() is find_edges(x,.. | Signal processing |
eig | Eigenvalues (and, for symmetric A, real eigenvectors) of a square n×n Mat A | Core maths |
elapsed | Returns a number: elapsed seconds so far | REPL & diagnostics |
elediv | The .*, ./ and .^ family: always elementwise, whatever the shapes | Core maths |
elemul | The .*, ./ and .^ family: always elementwise, whatever the shapes | Core maths |
elepow | The .*, ./ and .^ family: always elementwise, whatever the shapes | Core maths |
ellip | Returns a Model (kind "filter", field sos) | Signal processing |
ellipke | Complete elliptic integrals of the first and second kind with parameter m = k², returned as a record {K, E} shaped like m (number, Vec or Mat): ellipke(0) has K = E = pi/2,.. | Core maths |
ellipord | Same arguments and record as buttord, for ellip(r.order, rp, rs, r.kind, r.wn, fs) | Signal processing |
ellipse | Draws an ellipse centered at (cx, cy) (numbers) with semi-axis radii rx and ry (numbers, data units along x and y respectively) | Plotting |
emd | Empirical Mode Decomposition: splits x into oscillatory intrinsic mode functions (IMFs, highest frequency first) plus a residual trend, via the standard sifting algorithm | Signal processing |
emf | Adds simulated switching/EMI interference to x, a length-N signal vector, given the sample rate fs in Hz: an amplitude-modulated carrier plus damped bursts at each switching edge | Noise |
end_time | Added in v0.2.4. start_time + duration, i.e. the end of the record — one sample period after the last sample's own timestamp, so that end_time - start_time is exactly the duration | Signal processing |
ends_with | Returns a bool: true if s ends with suffix | Collections & strings |
energy | Returns a single number, sum(x.^2) — total signal energy | Signal processing |
enob | Returns a single number, bits — effective number of bits, inverting 6.02·bits + 1.76 on the measured SINAD | Signal processing |
enob_estimate | Returns a single number, bits — effective number of bits, inverting 6.02·bits + 1.76 on the measured SINAD | Signal processing |
enum_values | Returns a List of EnumVals: every variant of the declared type, in declaration order — makes the type a real enumeration rather than just a handful of named constants, and lets code.. | Collections & strings |
eof | Checks whether f (file handle, opened readable) has any bytes left to read from the current position | File I/O |
eps | Machine epsilon: eps() is 2.220446049250313e-16, the gap between 1 and the next double, and eps(x) is the spacing of doubles at abs(x) (as MATLAB): eps(1) = 2^-52, eps(1e10) =.. | Core maths |
erf | The error function and its complement (erfc(x) = 1 - erf(x), computed directly rather than by subtraction so it stays accurate for large x, where erf(x) itself has already saturated.. | Core maths |
erfc | The error function and its complement (erfc(x) = 1 - erf(x), computed directly rather than by subtraction so it stays accurate for large x, where erf(x) itself has already saturated.. | Core maths |
erfcinv | Inverse complementary error function, elementwise: erfc(erfcinv(y)) = y for y in [0, 2], with erfcinv(0) = inf, erfcinv(2) = -inf and erfcinv(1) = 0 | Core maths |
erfinv | Inverse error function, elementwise: erf(erfinv(y)) = y for y in [-1, 1], with erfinv(1) = inf and erfinv(-1) = -inf | Core maths |
error | Never returns normally — control passes to the nearest enclosing try/catch, where the caught exception object exposes the string as .message; uncaught, it aborts the script | REPL & diagnostics |
errorbar | Draws one capped whisker plus a marker per sample: x, y, yerr are equal-length numeric Vecs, yerr the (symmetric) half-height of each whisker in data units | Plotting |
estimate | Estimation-family only: reads a point estimate off a filter state Record state with no arguments | Statistics & ML |
estimate_complexity | Takes two same-length numeric vectors/lists: sizes (the problem sizes swept over) and times (the matching elapsed times in seconds, e.g. from toc() at each size) — at least 3 matching.. | REPL & diagnostics |
estimate_frequency | Returns a single number: the frequency of the largest non-DC bin in x's one-sided spectrum, accurate to the bin's own resolution fs/N | Signal processing |
exec | Runs program (a Str) and waits, capturing what it printed | File I/O |
exp | Returns exactly the same type and shape as x | Core maths |
exp2 | Returns exactly the same type and shape as x | Core maths |
expcdf | Exponential cumulative distribution with mean mu (MATLAB's convention; note exponential(rate) draws take a rate) | Statistics & ML |
expfit | Maximum-likelihood fit: a result with the named parameters mu, plus .params (the same as a vector), .n and .loglik (the log-likelihood at the estimate) | Statistics & ML |
expint | The exponential integral E1(x) = ∫ₓ^∞ e^-t / t dt for x > 0, elementwise (real scalar, Vec, Mat or Signal) | Core maths |
expinv | Inverse of expcdf, -mu * log(1 - p) | Statistics & ML |
explain | The report says whether that function is running the fast register-only ("soft-compiled") tier or falls back to the ordinary tree-walking interpreter, and — when interpreted — which.. | REPL & diagnostics |
explore | Writes a self-contained HTML page to path (string) with one slider per parameter of function "fn" (string) | Plotting |
expm | Matrix exponential e^A of a real square Mat by scaling-and-squaring with a degree-13 Padé approximant (Higham 2005, as SciPy): expm([0, -t; t, 0]) is the rotation [cos t, -sin t; sin.. | Core maths |
expm1 | e^x - 1, computed so it stays accurate for x near zero (expm1(1e-15) does not lose precision to the cancellation that exp(x) - 1 would hit there) | Core maths |
exponential | Exponential draws. rate (a positive number) is the rate, not the scale: the mean is 1/rate, and NumPy instead takes scale = 1/rate directly, so a value copied from NumPy needs.. | Statistics & ML |
exppdf | Exponential probability density with mean mu | Statistics & ML |
exprnd | Random draws from the exponential distribution | Statistics & ML |
expstat | Mean and variance of the exponential distribution with these parameters, as a result with fields .mean and .var | Statistics & ML |
extend | Returns a NEW List holding list's elements followed by other's: it CONCATENATES, where append(list, other) NESTS other as one element (so append(["a"], ["b","c"]) has length 2.. | Collections & strings |
eye | The n×n identity matrix (ones on the diagonal, zeros elsewhere) | Core maths |
F
f1 | Classification metrics on a length-N vector of true labels actual and a length-N vector of predicted labels predicted, each returning a single number macro-averaged over every class.. | Statistics & ML |
factor | Prime factors of the positive integer n, ascending and with multiplicity, as a Vec whose product is n; factor(1) is [1] | Core maths |
factorial | n! for a non-negative integer number or Vec of them | Core maths |
fall_time | Returns a single number: the transition time of the first complete rising (resp | Signal processing |
falling_edges | Returns a vector of the interpolated crossing positions of one polarity only — seconds for a Signal, samples otherwise (the same convention find_pulses's widths field uses) | Signal processing |
fcdf | F cumulative distribution at x with d1 (numerator) and d2 (denominator) degrees of freedom | Statistics & ML |
fft | On the FULL (two-sided) spectrum this returns, a real tone occupies TWO conjugate-symmetric bins, and scaling makes each of them independently read the tone's full peak amplitude (or RMS).. | Signal processing |
fftc | rfft returns a length-floor(N/2)+1 complex vector, the one-sided half-spectrum; fftc returns a length-N complex vector, the full spectrum | Signal processing |
fftr | Deprecated — use irfft. The same function under a name that reads as rfft's forward partner; it is actually rfft's inverse, so the pair reads backwards | Signal processing |
fifo | Returns a fifo handle: a new, empty ring buffer | Collections & strings |
figure | Clears/resets the whole figure (all panels), starting a fresh one | Plotting |
figure_background | Sets the current figure's SVG background fill to color (string: "#rrggbb" hex or a CSS named colour; default "#ffffff"), passed straight through, unparsed | Plotting |
figure_size | Sets canvas size either from w, h (numbers, raw units) or from a named journal-column preset string (e.g. "ieee1") | Plotting |
file_exists | Whether path (a Str) exists and is a regular file / a directory | File I/O |
file_history | The saved versions of path, newest first, as a table with columns version (the id), saved (UTC time) and bytes | File I/O |
file_size | Reports a file's size without opening it | File I/O |
file_versioning | Turns file history on (true) or off (false) for the rest of the run; with no argument, changes nothing | File I/O |
fill_between | A filled band between two curves: x, y_lo, y_hi are equal-length numeric Vecs giving the lower and upper boundary at each x, e.g. a confidence interval | Plotting |
fill_missing | x with the missing samples patched, same length, so a Signal keeps its Fs | Noise |
fillna | Replaces every NaN (the missing-value marker) in a vector or matrix by value, leaving every other entry, inf included, untouched | Statistics & ML |
filter | Returns a Table containing only the rows where mask is true | Collections & strings |
filter_ba | Returns a same-length vector or Signal | Signal processing |
filter_from_sos | Returns a Model (kind "filter", field sos) that works with sosfilt, filtfilt, freqz, fvtool, filter_info, bode and the rest, for coefficients designed elsewhere | Signal processing |
filter_from_tf | Returns a Model (kind "filter") | Signal processing |
filter_from_zpk | Returns a Model (kind "filter", field sos) for H(z) = k * prod(z - z_i) / prod(z - p_i) | Signal processing |
filter_info | Returns one record of the numbers shown beside a filter's plots: fs, stable, stability_margin (1 minus the largest pole radius), dc_gain, dc_gain_db, delay (group delay at DC,.. | Signal processing |
filter_init | Returns a Model (kind "filter_state") holding fresh all-zero streaming state for sample-at-a-time filtering: field is an (n_sections, 2) biquad-state matrix for an IIR (sos) filter,.. | Signal processing |
filter_next | Returns a new "filter_state" Model (field y, a number, holds the filtered output) | Signal processing |
filtfilt | Returns a same-length vector or Signal, same Fs-preserving convention as sosfilt | Signal processing |
find | One argument: identical to where(mask) — the indices where a boolean mask is true, as a Vec | Core maths |
find_clipping | Same detection as is_clipped, same keywords, but returns *where* | Signal processing |
find_edges | The reported positions are taken at level either way, so switching hysteresis on to reject glitches does not move the measurements it protects | Signal processing |
find_missing | The indices of the missing samples, as a number vector | Noise |
find_outliers | The indices of the samples a criterion flags, as a number vector (same shape of answer as find_peaks) | Noise |
find_peaks | Kwarg names match SciPy; the original min_height/min_distance/min_prominence names are still accepted as aliases | Signal processing |
find_pulses | Returns a Model (kind "pulses") with fields starts, stops (vectors of integer sample indices — stops, not ends, because end is a Qu keyword), widths (a vector of times:.. | Signal processing |
find_trigger | Returns a vector of 0-indexed integer sample indices, one per crossing, each being the first sample of the new state — a rising crossing at i means x[i-1] < level <= x[i] | Signal processing |
find_zero_crossings | find_trigger at level zero. The default is both directions, unlike find_trigger's own default: the zero-crossing rate is a count of every sign change, so len(find_zero_crossings(x)).. | Signal processing |
findpeaks | MATLAB-style [peaks, locations] = findpeaks(x, ...) | Signal processing |
finv | Inverse of fcdf -- the F critical value: finv(0.95, 5, 10) = 3.326 | Statistics & ML |
fir1 | Returns a Model (kind "filter", field b, a length-n+1 vector) | Signal processing |
firls | Returns a Model (kind "filter", field b, a length-n+1 vector) | Signal processing |
firpm | The MATLAB name for remez: same arguments, same result | Signal processing |
first | Returns the first (first) or last (last) element (same element type as xs holds), or none when xs is empty | Collections & strings |
fit | Runs a pipeline Record pipe (from pipeline(...)) on an N-row feature matrix X and a length-N target vector y: applies every transform stage in order, then calls the final.. | Statistics & ML |
fit_scaler | Fits and stores scaling parameters from an N-row, D-column matrix (or vector, or table) X, for reuse on new data — the fit-once path, as opposed to the four one-shot verbs above | Statistics & ML |
fix | Rounds toward zero (fix(-2.7) is -2, fix(2.7) is 2); the MATLAB name for trunc | Core maths |
flatten | Returns a flat List: one level of nesting removed | Collections & strings |
flip | Reverses row order (flipud, dim=1) or column order (fliplr/mirror, dim=2) of A, a Str, Vec, Mat, or Image | Core maths |
fliplr | Reverses row order (flipud, dim=1) or column order (fliplr/mirror, dim=2) of A, a Str, Vec, Mat, or Image | Core maths |
flipud | Reverses row order (flipud, dim=1) or column order (fliplr/mirror, dim=2) of A, a Str, Vec, Mat, or Image | Core maths |
floor | Standard rounding functions, elementwise: floor toward negative infinity, ceil toward positive infinity, round to the nearest integer (half away from zero) | Core maths |
fminbnd | Minimises a function of one number on a closed interval | Signal processing |
fold | Returns the final accumulated value (whatever type f produces) | Collections & strings |
fontfamily | Sets the figure-wide font (string name, inherited by every title/label/tick/legend) | Plotting |
fontsize | A bare number n scales tick/label/title text together (in points); named arguments tick=, label=, title= (each a number, points) override each independently (and win over the.. | Plotting |
fopen | Opens a file for reading, writing, or appending | File I/O |
foreground_mask | Thresholds img at level, then applies imopen(radius) to remove noise specks | Images |
format | Interpolation ({x:.2f}) reads better inline; format is for a pattern held in a variable | Collections & strings |
forward | Runs the forward algorithm on an hmm model hmm for a length-T integer observation-symbol sequence obs (each entry a 0-based column index into emission) | Statistics & ML |
fpdf | F probability density. Returns the same shape as x | Statistics & ML |
freqz | Returns a length-n complex vector (CVec), the response H(e^{jω}) at n points from DC to Nyquist inclusive | Signal processing |
frnd | Random draws from the F distribution | Statistics & ML |
fsolve | Solves the nonlinear system f(x) = 0 | Signal processing |
fstat | Mean and variance of the F distribution with these parameters, as a result with fields .mean and .var | Statistics & ML |
fuzzy_pid_init | A Mamdani fuzzy PD-type controller's initial state — the classic 2-input (error, error_dot), 1-output textbook fuzzy inference system | Signal processing |
fvtool | MATLAB's Filter Visualization Tool: a 2x2 figure (magnitude response in dB, phase, group delay, impulse response) built from freqz/group_delay/sosfilt | Signal processing |
fzero | Returns a single number, the root | Signal processing |
G
gain | Returns the same shape as x, scaled by 10^(db/20) — the AMPLITUDE convention, the same factor of 20 as db2mag | Signal processing |
gamcdf | Gamma cumulative distribution with shape a and scale b (mean a*b) -- MATLAB's parameterisation, not a rate | Statistics & ML |
gamfit | Maximum-likelihood fit: a result with the named parameters a, b, plus .params (the same as a vector), .n and .loglik (the log-likelihood at the estimate) | Statistics & ML |
gaminv | Inverse of gamcdf, same shape/scale parameters | Statistics & ML |
gamma | The gamma function (gamma(n) = (n-1)! for a positive integer n) and its natural log (lgamma(x) = ln|gamma(x)|) | Core maths |
gammainc | Regularized incomplete gamma function: P(a, x) = γ(a, x) / Γ(a) for tail = "lower" (the default) or Q(a, x) = 1 - P(a, x) for tail = "upper", with P(1, x) = 1 - exp(-x) and.. | Core maths |
gampdf | Gamma probability density, shape a, scale b | Statistics & ML |
gamrnd | Random draws from the gamma distribution | Statistics & ML |
gamstat | Mean and variance of the gamma distribution with these parameters, as a result with fields .mean and .var | Statistics & ML |
gaussian_process | Gaussian-process regression on an N-row, D-column matrix X and a length-N target y | Statistics & ML |
gcd | Greatest common divisor of two integers (always non-negative; gcd(0, 0) is 0) | Core maths |
generate | Runs greedy (argmax, no sampling knobs, no temperature) text completion on a model handle model from llm_load, given a string prompt and an integer cap max_tokens (default 64) on.. | Statistics & ML |
geocdf | Cumulative geometric distribution P(X <= k), a step function of floor(k) | Statistics & ML |
geofit | Maximum-likelihood fit: a result with the named parameters p, plus .params (the same as a vector), .n and .loglik (the log-likelihood at the estimate) | Statistics & ML |
geoinv | Inverse of geocdf: the smallest support point whose CDF reaches p (so geoinv(geocdf(k, ...), ...) is k), for p in [0, 1] (outside is an error) | Statistics & ML |
geopdf | Probability mass of the geometric distribution at k (a number, vector or matrix, elementwise); zero at a non-integer or out-of-support k | Statistics & ML |
geornd | Random draws from the geometric distribution | Statistics & ML |
geostat | Mean and variance of the geometric distribution with these parameters, as a result with fields .mean and .var | Statistics & ML |
gerischer | Zg/sqrt(k + jw) — a coupled chemical reaction | Signal processing |
get | get returns the stored value (any type) or default (none when you give none) if key is absent -- the optional third argument is new in v0.4.7; before it was accepted and ignored | Collections & strings |
getenv | Reads one environment variable | File I/O |
glob | Every file matching a whole-path wildcard, as full paths, sorted — never a directory, which is what makes the content and size filters mean something on every entry | File I/O |
gmm_model | Gaussian mixture model with k components fitted by EM on an N-row, D-column matrix X, warm-started from a k-means run (optional integer seed=, and max_iter capping the EM.. | Statistics & ML |
goertzel | Returns a single complex scalar for a scalar k, or a length-K CVec for a vector — the K-point DFT this is named for: K arbitrary points in O(n·K), each independently, instead of every.. | Signal processing |
goertzel_freq | Returns a single complex scalar or a length-K CVec, same batching as goertzel above | Signal processing |
gpu_matmul | WebGPU-accelerated matmul via qu-gpu, same A/B shape requirements and r×c Mat return as matmul; only present in builds compiled with --features gpu | Core maths |
gpu_probe_info | Returns a struct-like value with three fields: .available (a boolean, whether a GPU backend was found), .crossover (a number, the measured matrix/problem size above which the GPU wins.. | REPL & diagnostics |
grad | Takes loss — a tracked scalar that is the result of a computation built from tracked inputs — plus either a keyword argument wrt=X (one tracked tensor X) or one or more positional.. | REPL & diagnostics |
gradient | Numerical derivative of the samples in the Vec v (at least two): central differences in the interior, (v[i+1]-v[i-1])/(x[i+1]-x[i-1]), which is exact for a quadratic on a uniform.. | Core maths |
gradient_boosting_model | Regression-only boosted ensemble on an N-row, D-column X and length-N y: n_trees (positive integer) shallow trees fitted in sequence, each to the running residual, scaled by.. | Statistics & ML |
graph | Optional named directed (bool, default false) | Collections & strings |
grayscale | Converts RGB → luma via ITU-R BT.601 weights (matches plotting.rs's contrast_text_color) | Images |
grep | Returns a List of the matching (or non-matching) LINES — regex_find_all returns the matched substrings themselves, a different thing | Collections & strings |
grid | Calling grid(...) as a function is accepted but is a no-op — only the bare command form actually changes anything | Plotting |
grid_search | Cross-validates fit(X, y, params) over every combination of grid, a record of lists such as {k = [1, 3, 5], tag = [10, 20]} (a single value counts as a one-point list; the last name.. | Statistics & ML |
gridworld_env | Builds an n x n grid environment (integer n), with start/goal (optional integer state indices, defaulting to opposite corners), step_reward (number, default -1, given on every.. | Statistics & ML |
group_by_agg | Returns a Table: one row per distinct value of group_col, with value_col aggregated | Collections & strings |
group_delay | Returns a length-n real vector, -dφ/dω in samples, same n-point/frequency-axis convention as freqz | Signal processing |
groupbar | Grouped (side-by-side) bar chart: x (Vec, category positions) and y (Mat or list of Vecs, one series per group of bars) | Plotting |
gru_cell | One GRU timestep: x_t (length-input_size input vector), h_prev (length-hidden_size previous hidden state), weights (a Record with the nine gate fields gru_init produces) | Statistics & ML |
gru_forward | Unrolls gru_cell over a whole sequence: x_sequence an (input_size, seq_len) matrix, h0 a length-hidden_size initial hidden state, weights the same Record gru_cell takes | Statistics & ML |
gru_init | Builds fresh GRU weights for an input of size input_size (integer) and a hidden state of size hidden_size (integer): Xavier-scaled weight matrices and zero biases for the update, reset.. | Statistics & ML |
H
h5info | Lists what is inside an HDF5 file | File I/O |
h5read | Reads one dataset from an HDF5 file with a built-in pure-Rust reader (no HDF5 library needed) | File I/O |
hamming | Returns a length-n real vector | Signal processing |
hamming74_decode | Computes each block's syndrome, flips the bit it names, and recovers the data | Signal processing |
hamming74_encode | Hamming(7,4) systematic encoder, 7 bits out per 4 in, laid out [p1, p2, d1, p4, d2, d3, d4] with the parity bits at the power-of-two positions — the layout that makes a nonzero syndrome.. | Signal processing |
hampel | Outlier removal: replaces a sample by the local median only when it is more than n_sigma robust deviations (1.4826 × MAD) from it | Noise |
hankel | Hankel matrix (constant anti-diagonals) with first column c; with r (the last row, whose first element is ignored in favour of c's last) it is length(c)×length(r), without it.. | Core maths |
hann | Returns a length-n real vector | Signal processing |
has_edge | has_edge(g, a, b) returns a bool; neighbors(g, name) returns a List of Str node ids | Collections & strings |
has_key | Returns a bool: whether the dict has that key, without reading it | Collections & strings |
havriliak_negami | Rh/(1 + (jw tau)^a)^g | Signal processing |
head | Returns the first (head) or last (tail) n elements/rows, same type as s | Collections & strings |
heatmap | Grid of colored cells: matrix is a Mat, each cell coloured by its own value scaled to the matrix's own min/max | Plotting |
help | Prints what is known about that name directly to the console and returns none — that it exists, near matches when it does not (e.g. help("not_a_real_fn") suggests close spellings), and.. | REPL & diagnostics |
hessian | Takes a scalar-valued function f and a point x, and returns the n x n matrix of second derivatives, symmetrized | REPL & diagnostics |
hex2dec | Reads a hexadecimal digit string as a number | Collections & strings |
hexbin | The plane tiled with hexagons, each shaded by how many points fell in it — for the case a scatter cannot do, where past a few thousand marks the picture saturates into a blob | Plotting |
high_time | Returns a single number: the sum of the widths of every complete pulse above (high_time) or below (low_time) the threshold, in seconds for a Signal and samples otherwise | Signal processing |
hilb | The n×n Hilbert matrix, H(i,j) = 1/(i+j-1) (1-based): symmetric, positive definite and famously ill-conditioned (cond(hilb(8)) is about 1.5e10) | Core maths |
hilbert | Returns a length-N complex vector (CVec), the analytic signal x + j*H[x] | Signal processing |
hist | Bins samples (Vec of numbers) into equal-width buckets and renders as bars; bins (integer, positional or bins= keyword) defaults to ceil(sqrt(n)) for n = len(samples) | Plotting |
histeq | Global histogram equalization: builds a BT.601-luma cumulative distribution and remaps intensities to spread across the full range | Images |
histogram | Bins samples (Vec of numbers) into equal-width buckets and renders as bars; bins (integer, positional or bins= keyword) defaults to ceil(sqrt(n)) for n = len(samples) | Plotting |
hit_miss | The morphological hit-or-miss transform: output pixel (x, y) is foreground iff EVERY foreground pixel of se_fg (relative to its own center) lands on a foreground pixel of img at that.. | Images |
hline | Draws a horizontal reference line spanning the whole panel at y (number, data units) | Plotting |
hmm | Builds a discrete hidden Markov model from an (S, S) row-stochastic hidden-state transition matrix transition, an (S, O) row-stochastic emission matrix emission (O the number of.. | Statistics & ML |
hourly_profile | Returns a length-24 real vector, one bin per hour-of-day | Signal processing |
hsl | Builds a colour from hue h (number, degrees, 0–360), saturation s (number, 0–1) and lightness l (number, 0–1, symmetric about 0.5 — "the same colour, lighter" is one number going up) | Plotting |
hstack | Named equivalents of bracket-literal block concatenation ([a, b] horizontally / [a; b] vertically) | Core maths |
hsv | Builds a colour from hue h (number, degrees, 0–360), saturation s (number, 0–1) and value/brightness v (number, 0–1) | Plotting |
html2md | Converts the same subset back to Markdown; malformed HTML degrades to its text rather than erroring | Collections & strings |
http_get | Issues an HTTP(S) GET request and returns the response body as a string (UTF-8, decoded lossily — the same convention read_all_text/text-mode read_all already use) | Concurrency |
huffman_decode | Inverse of huffman_encode: enc is the whole Record that call returned, passed back unchanged; as_str (named boolean, default false) asks for text instead of bytes | File I/O |
huffman_encode | Canonical Huffman coding of data (a Str, or a Vec of 0-255 byte values) | File I/O |
hum | Adds simulated mains pickup to x, a length-N signal vector, given the sample rate fs in Hz | Noise |
hurst_exponent | Returns a single number: 0.5 is a random walk, above that persistent, below it mean-reverting — long-range dependence | Signal processing |
hygecdf | Cumulative hypergeometric distribution P(X <= k), a step function of floor(k) | Statistics & ML |
hygeinv | Inverse of hygecdf: the smallest support point whose CDF reaches p (so hygeinv(hygecdf(k, ...), ...) is k), for p in [0, 1] (outside is an error) | Statistics & ML |
hygepdf | Probability mass of the hypergeometric distribution at k (a number, vector or matrix, elementwise); zero at a non-integer or out-of-support k | Statistics & ML |
hygernd | Random draws from the hypergeometric distribution | Statistics & ML |
hygestat | Mean and variance of the hypergeometric distribution with these parameters, as a result with fields .mean and .var | Statistics & ML |
hypot | sqrt(x² + y²) without overflow/underflow in the intermediate squares: hypot(3, 4) is 5, hypot(1e200, 1e200) is 1.414…e200 where sqrt(x^2 + y^2) gives inf | Core maths |
I
ica | The (N, k) recovered sources directly, as pca(X, k) sits beside pca_model | Statistics & ML |
ica_model | Independent component analysis (FastICA, logcosh contrast, symmetric decorrelation) recovering k sources from the D mixed columns of X | Statistics & ML |
idct | Returns a length-N real vector | Signal processing |
identity | The n×n identity matrix (ones on the diagonal, zeros elsewhere) | Core maths |
idft | Returns a length-N CVec. Inverse of dft, same O(n²) direct implementation | Signal processing |
idwt | Returns a length-2N real vector, reconstructing the original signal | Signal processing |
ifft | Inverse DFT, same underlying kernel as fft run in reverse | Signal processing |
im | Imaginary component of a Complex/CVec/CMat (0 elementwise when x is real) | Core maths |
imadjust | MATLAB-style contrast stretch, applied identically and independently to each of R/G/B | Images |
imag | Imaginary component of a Complex/CVec/CMat (0 elementwise when x is real) | Core maths |
image_from_matrix | Builds a grayscale Image directly from matrix, a 2-D Mat of numbers; each value is rounded and clamped to 0–255 and written to R=G=B for that pixel (matrix rows become image rows,.. | Images |
image_new | Creates a blank solid-color canvas | Images |
imagesc | False-color raster display of the plain numeric matrix (no pixel buffer produced) — pushes a dense Heatmap onto the current plot panel, reusing the same renderer as heatmap, just.. | Images |
imbothat | Bottom-hat: imclose(img, radius) - img, extracts small dark features / corrects a slowly-varying dark background | Images |
imclose | Morphological closing (dilate then erode) — fills small background holes without enlarging the overall shape | Images |
imdilate | Performs binary morphological dilation, growing foreground regions | Images |
imequalize | Histogram equalisation, spreading the intensities to fill the range (identical operation to histeq above) | Images |
imerode | Binary morphological erosion — shrinks foreground regions and removes specks smaller than the element | Images |
imfilter | Generic 2-D convolution with edge-clamped borders — the escape hatch when blur/sharpen/edge_detect's fixed kernels aren't enough | Images |
imhist | Computes raw per-bin BT.601-luma intensity counts | Images |
imnoise | For "gaussian": mean/sigma are optional named numbers (defaults 0.0/0.05), the additive per-channel Gaussian noise's mean/standard-deviation in normalized [0,1] intensity units | Images |
imopen | Morphological opening (erode then dilate) — removes specks smaller than the structuring element while leaving larger shapes their size | Images |
impedance | Returns a complex vector, one impedance per frequency — this is the forward form, which evaluates a circuit model; see *Measured impedance* below for impedance(voltage, current), which.. | Signal processing |
impedance_from_reflection | Returns z = z0(1 + Γ)/(1 - Γ), the exact inverse | Signal processing |
impulse | Returns a length-n plain vector (not a Signal, since no fs is given — wrap in signal(impulse(n), fs) if a sample rate is needed): a Kronecker delta, all zeros except amplitude at.. | Signal processing |
impute | Replaces each NaN by a statistic of the observed (non-NaN) values of its own column (a vector is one column): strategy is "mean", "median" (the mean of the two middle values for.. | Statistics & ML |
impz | Returns the impulse response as a length-n real vector | Signal processing |
imrotate | Rotates an image about its own center | Images |
imscale | Implemented as imwarp + affine_scale | Images |
imshow | Places it inline in the current plot panel as a native SVG <image> element at its own resolution | Images |
imtophat | The image minus its opening: what the opening removed | Images |
imtranslate | Implemented as imwarp + affine_translate | Images |
imwarp | Applies M to img in one resampling pass via inverse mapping | Images |
inch | Length units as functions, converting a scalar v (millimetres/centimetres/inches/points as named) to the figure's own coordinate space — a tenth of a millimetre, so mm(1) is 10,.. | Core maths |
index | Returns a Table: t with its row index set to that column, so rows can afterwards be looked up by label | Collections & strings |
index_of | Returns a number (0-based character position of the first occurrence) or none if sub is absent | Collections & strings |
indexof | Returns a number (0-based index of the first match) or Nothing if absent (composes with ??: indexof(xs, v) ?? -1) | Collections & strings |
inductor | jwL | Signal processing |
input | Starts the pipeline sugar: n (a positive integer) is the number of input features | Statistics & ML |
insert | Returns a new Str; s itself is untouched | Collections & strings |
insert_column | Returns a NEW Table; the original is untouched | Collections & strings |
insert_row | Inserts one row into a table at a chosen position | Collections & strings |
integral2 | Adaptive double integral of f(x, y) over the region xa <= x <= xb, ya(x) <= y <= yb(x) | Signal processing |
interp1 | 1-D interpolation through (x, y) (MATLAB's interp1) | Signal processing |
interp2 | 2-D grid interpolation (MATLAB's interp2): a query exactly at a grid coordinate returns that exact stored value, not an approximation; extrapolation beyond the grid is always on, matching.. | Signal processing |
interpolate_at | A Signal-aware interp1: instead of an explicit x, the signal's OWN implicit time axis (sig.t, i.e. i/Fs) is used as x and sig's samples as y | Signal processing |
interpolate_nan | Exactly fill_missing(x, method="linear") — the same engine, not a second implementation — kept under its own name because that is the operation people go looking for by name | Noise |
inv | True inverse of A (a square Mat or CMat); requires full rank, errors otherwise | Core maths |
inverse_transform | Undoes a fitted scaler Record scaler's transform on an already-scaled matrix/vector/table newX, returning it to the original units | Statistics & ML |
invhilb | The exact inverse of hilb(n) | Core maths |
iqr | Interquartile range: percentile(x,75) - percentile(x,25) — a spread measure robust to outliers, unlike std/var | Core maths |
irfft | Inverse of rfft. half_spectrum is a length-floor(n/2)+1 complex vector (CVec); n (required number), the real output length, can't be recovered from the half-spectrum's length.. | Signal processing |
is_clipped | Returns a Bool: does x contain a flat run at an extreme | Signal processing |
is_empty | Whether the fixed-capacity ring buffer q (a Fifo handle created by fifo(capacity)) currently holds nothing, or has no room left for another push without evicting the oldest element | Core maths |
is_full | Whether the fixed-capacity ring buffer q (a Fifo handle created by fifo(capacity)) currently holds nothing, or has no room left for another push without evicting the oldest element | Core maths |
is_stable | Returns a boolean, true iff every pole lies strictly inside the unit circle — the standard causal-LTI stability criterion | Signal processing |
isbanded | true when every nonzero of A lies within lower diagonals below and upper diagonals above the main diagonal, so isbanded(A, 0, 0) is isdiag(A) and isbanded(A, 1, 1) asks for.. | Core maths |
isdiag | true when every entry off the main diagonal is exactly 0 (any shape; an all-zero matrix is diagonal) | Core maths |
isfinite | A scalar gives a bool; a Vec/Signal gives a mask, so x[isfinite(x)] drops the bad samples and sum(isnan(x)) counts them; a Mat gives a flat column-major mask (use.. | Core maths |
isinf | A scalar gives a bool; a Vec/Signal gives a mask, so x[isfinite(x)] drops the bad samples and sum(isnan(x)) counts them; a Mat gives a flat column-major mask (use.. | Core maths |
isnan | A scalar gives a bool; a Vec/Signal gives a mask, so x[isfinite(x)] drops the bad samples and sum(isnan(x)) counts them; a Mat gives a flat column-major mask (use.. | Core maths |
isolation_forest | Anomaly detection on an N-row, D-column matrix X by random partitioning (Liu, Ting & Zhou 2008): grows n_trees (integer, default 100) trees, each on its own subsample of.. | Statistics & ML |
isposdef | true when A is symmetric and positive definite, that is when the Cholesky factorisation succeeds | Core maths |
isprime | Whether the integer n is prime: a Bool for a number, a Mask for a Vec of integers | Core maths |
issymmetric | true when A equals its transpose | Core maths |
istril | true when A is lower triangular: every entry above the main diagonal is exactly 0 (any shape; diagonal matrices qualify) | Core maths |
istriu | true when A is upper triangular: every entry below the main diagonal is exactly 0 (any shape; diagonal matrices qualify) | Core maths |
items | Returns a List: its keys (keys), its values (values), or (key, value) tuples (items) — insertion order, not sorted | Collections & strings |
J
jacobian | Takes a function f and a point x (number, vector, or matrix), and returns the full Jacobian matrix of f at x as an m x n matrix, where J[i][j] is the derivative of output.. | REPL & diagnostics |
join | Two unrelated forms selected by the argument's type | Concurrency |
js_exec | Runs code (string, source in the guest language) as a subprocess | File I/O |
json2csv | str (string, JSON text) is converted to CSV text: exactly csvify(parse_json(str)). Returns a string | File I/O |
json2xml | str (string, JSON text) is converted to XML: exactly xmlify(parse_json(str)). Returns a string | File I/O |
jsonify | Converts any value (any Value — number, string, Vec, Table, Record, ...) to a JSON string — exactly the save/load on-disk shape (see the link above: a {"type": ..., ...}.. | File I/O |
K
k_fold | Splits an N-row feature matrix X and a length-N target vector y into an integer number of folds cross-validation folds | Statistics & ML |
kaiser | Returns a length-n real vector, w[i] = I0(beta*sqrt(1-((2i/(n-1))-1)^2)) / I0(beta) | Signal processing |
kaiserord | Returns Kaiser's estimate of the FIR order and window beta for a ripple specification, as a record {order, beta, wn, kind} for fir1(r.order, r.wn, kind=r.kind, window="kaiser",.. | Signal processing |
kalman_init | Initial linear-Kalman state: x0 a length-D initial state estimate vector, P0 a (D, D) initial covariance matrix | Statistics & ML |
kapur_threshold | Same "compute, don't apply" shape as otsu_threshold, but using Kapur's entropy-maximizing criterion instead of Otsu's between-class variance — tends to handle unequal class sizes better | Images |
keys | Returns a List: its keys (keys), its values (values), or (key, value) tuples (items) — insertion order, not sorted | Collections & strings |
kmeans | Lloyd's algorithm on an N-row, D-column data matrix X, partitioning it into the integer number of clusters k, starting from randomly chosen initial centroids (an optional integer.. | Statistics & ML |
kmeans_centers | The same Lloyd's-algorithm run as kmeans on X/k/seed=, returning the (k, D) centroid matrix instead of the labels | Statistics & ML |
kmeans_model | k-means as a reusable handle: fits on an N-row, D-column matrix X into k clusters (optional integer seed=), so .predict(Xnew) later assigns new rows to the nearest centroid.. | Statistics & ML |
kmedians_model | The outlier-resistant sibling of kmeans_model, same X/k/seed= shape: clusters by L1 distance around coordinate-wise median centres instead of means | Statistics & ML |
kmedoids_model | PAM clustering on the same X/k/seed= shape as kmeans_model — every one of the k centres is an actual row of X, never an average | Statistics & ML |
knn_model | k-nearest-neighbours on an N-row, D-column X and a length-N target y, with integer neighbour count k, an optional metric string (distance function name), and kind.. | Statistics & ML |
kron | Kronecker product: every A[i,j] replaced by the block A[i,j]·B, so an m×n and a p×q input give mp×nq | Core maths |
kurtosis | Fourth standardized moment, population form, of a length-N numeric vector x | Statistics & ML |
L
lab | Builds a colour from CIE L\*a\*b\* coordinates: L (number, lightness, 0–100), a and b (numbers, roughly -128..127, green–red and blue–yellow axes) | Plotting |
label_blobs | Connected-component labelling: every separate region gets its own integer (identical operation to bwlabel above) | Images |
label_decode | The inverse of label_encode: the classes entry at each 0-based code, a Vec when classes is numeric and a list when it holds strings | Statistics & ML |
label_encode | Replaces each label by the 0-based index of its class in sorted class order | Statistics & ML |
last | Returns the first (first) or last (last) element (same element type as xs holds), or none when xs is empty | Collections & strings |
last_index_of | Returns a number (0-based character position of the last occurrence, searching from the end) or none if absent — so a miss cannot be mistaken for a position | Collections & strings |
layer_norm | Normalizes each row of an N-row, D-column matrix x independently to zero mean and unit variance, then applies a learned length-D per-feature scale gamma and shift beta, with.. | Statistics & ML |
lcase | BASIC's names for upper/lower; toupper/tolower are C's names for the same thing | Collections & strings |
lcm | Least common multiple of two integers, non-negative (0 if either is 0); same argument shapes as gcd | Core maths |
lda_model | Linear discriminant analysis on an N-row, D-column X and a length-N vector of numeric class labels y (at least 2 classes) | Statistics & ML |
learning_curve | How a model's score changes with the amount of training data | Statistics & ML |
least_squares | Nonlinear least squares on a residual function you named, via Levenberg-Marquardt | Core maths |
left | The first n characters of a string | Collections & strings |
legend | Shows or hides the key for the current panel | Plotting |
legendre | Associated Legendre functions P_n^m(x) for m = 0..n, unnormalised and with the Condon-Shortley phase (-1)^m, as MATLAB | Core maths |
len | Returns a number: the current element count (via the same generic length dispatch every collection uses) | Collections & strings |
length | Total element count of x: 1 for a scalar, its length for a Vec/CVec/Signal, rows*cols for a Mat, a Unicode-aware character count for a Str, and the element/node count for.. | Core maths |
lfilter | Returns a same-length vector or Signal | Signal processing |
lgamma | The gamma function (gamma(n) = (n-1)! for a positive integer n) and its natural log (lgamma(x) = ln|gamma(x)|) | Core maths |
like | BASIC's wildcard match, anchored at both ends: * any run, ? any one character, # any digit, [abc]/[!abc] a set | Collections & strings |
line | Builds a line-segment structuring-element mask Image by Bresenham-rasterizing a length-pixel segment centered on its own middle pixel | Images |
lines | Splits on either line ending, with no spurious empty last element when the text ends in a newline | Collections & strings |
linked_list | Returns a linked_list handle: a new, empty double-ended list | Collections & strings |
linprog | Linear programming: minimises c'x subject to A x <= b, Aeq x = beq and lb <= x <= ub | Signal processing |
linspace | Returns a length-n real vector, n linearly spaced points from a to b inclusive — the standard companion for building a time or frequency axis to plot alongside a.. | Signal processing |
list_dir | The bare names inside path (a Str), sorted — "a.qu", not "tools/a.qu" | File I/O |
list_files | Every file matching a whole-path wildcard, as full paths, sorted — never a directory, which is what makes the content and size filters mean something on every entry | File I/O |
listdir | The bare names inside path (a Str), sorted — "a.qu", not "tools/a.qu" | File I/O |
listen_pool | Binds port and blocks forever (this call never returns under normal operation), accepting job requests over TCP and running only functions named in allow | Concurrency |
llm_load | Loads a chat model, identified by name: a string, either a bundled name like "tinyllama" or a local filesystem path to a .gguf weights file with a tokenizer.json beside it | Statistics & ML |
lms_init | The least-mean-squares (LMS) adaptive FIR filter's initial state | Signal processing |
ln | Natural logarithm, elementwise (log is an alias for ln — it is not base-10; see log10 for that) | Core maths |
load | Restores every variable a save/save_all call wrote | File I/O |
load_image | Reads the file from disk and decodes it — PNG, BMP, JPEG and TIFF | Images |
load_library | Loads a native shared library (.dll on Windows, .so on Linux, .dylib on macOS) so its C functions can be called with native_call | File I/O |
load_model | Reads a model previously written by save_model back from the HDF5 file at the string path | Statistics & ML |
load_svg | Reads an SVG file back. Returns a Record with fields width, height (from the width/height attributes, falling back to the viewBox when those are absent or a percentage; absolute.. | Images |
log | Natural logarithm, elementwise (log is an alias for ln — it is not base-10; see log10 for that) | Core maths |
log10 | Base-10 / base-2 logarithm, elementwise, same domain behavior as ln on a non-positive element | Core maths |
log1p | ln(1 + x), computed so it stays accurate for x near zero (log1p(1e-15) does not underflow to exactly 0, unlike naively computing 1.0 + x first) | Core maths |
log2 | Base-10 / base-2 logarithm, elementwise, same domain behavior as ln on a non-positive element | Core maths |
logistic_model | Binary logistic regression on an N-row, D-column X and a length-N 0/1 target y | Statistics & ML |
loglog | Plots equal-length numeric Vecs x, y like plot and additionally sets both axes to log scale | Plotting |
logm | Principal matrix logarithm of a dense real square matrix, the inverse of expm: expm(logm(A)) = A | Core maths |
logncdf | Cumulative log-normal distribution P(X <= x) | Statistics & ML |
lognfit | Maximum-likelihood fit: a result with the named parameters mu, sigma, plus .params (the same as a vector), .n and .loglik (the log-likelihood at the estimate) | Statistics & ML |
logninv | Inverse of logncdf: the x with logncdf(x) = p, for p in [0, 1] (outside is an error) | Statistics & ML |
lognpdf | Probability density of the log-normal distribution at x (a number, vector or matrix, elementwise) | Statistics & ML |
lognrnd | Random draws from the log-normal distribution | Statistics & ML |
lognstat | Mean and variance of the log-normal distribution with these parameters, as a result with fields .mean and .var | Statistics & ML |
logspace | Returns a length-n real vector, n logarithmically spaced points, 10^linspace(a, b, n) — used for frequency axes in Bode-style plots and rLKK's default DRT grid | Signal processing |
logsumexp | Numerically stable log(sum(exp(x))), via the usual max-shift so a large input can't overflow exp | Core maths |
low_time | Returns a single number: the sum of the widths of every complete pulse above (high_time) or below (low_time) the threshold, in seconds for a Signal and samples otherwise | Signal processing |
lower | Unicode-aware lowercase conversion | Collections & strings |
lr_adaptive | Learning-rate controllers that wrap a base optimizer rather than replacing it: lr= the starting learning rate (number), patience an integer number of epochs to wait for improvement.. | Statistics & ML |
lr_plateau | Learning-rate controllers that wrap a base optimizer rather than replacing it: lr= the starting learning rate (number), patience an integer number of epochs to wait for improvement.. | Statistics & ML |
lse | Numerically stable log(sum(exp(x))), via the usual max-shift so a large input can't overflow exp | Core maths |
lstm_cell | One LSTM timestep: x_t (length-input_size input vector), h_prev/c_prev (length-hidden_size previous hidden/cell state vectors), and weights (a Record with the twelve gate fields.. | Statistics & ML |
lstm_forward | Unrolls lstm_cell over a whole sequence: x_sequence an (input_size, seq_len) matrix (one column per timestep), h0/c0 length-hidden_size initial states, weights the same.. | Statistics & ML |
lstm_init | Builds fresh LSTM weights for an input of size input_size (integer, number of features per timestep) and a hidden state of size hidden_size (integer): Xavier-scaled weight matrices and.. | Statistics & ML |
lstsq | Minimum-norm least-squares solution of A·x ≈ b through the SVD pseudo-inverse, always (so a rank-deficient or under-determined A returns the shortest solution: lstsq([1, 1; 1, 1], [2,.. | Core maths |
lti_bode | Returns a record {w, mag_db, phase_deg}: magnitude in dB and phase in degrees at each frequency | Signal processing |
lti_c2d | Returns the discrete system with sample time dt that corresponds to the continuous sys, in state-space form | Signal processing |
lti_d2c | Returns the continuous system that lti_c2d with the same method would turn into the discrete sys, in state-space form | Signal processing |
lti_dcgain | Returns the steady-state gain, H(0) for a continuous system and H(1) for a discrete one: a number for one input and one output, an outputs x inputs matrix otherwise | Signal processing |
lti_feedback | Returns the closed loop with plant in the forward path and controller in the return path, plant / (1 + plant * controller) for the default negative feedback, as an "lti" model in.. | Signal processing |
lti_freqresp | Returns the frequency response as a complex vector, one value per entry of w (a complex number when w is a number): H(jw) with w in rad/s for a continuous system, H(e^{jw}) with.. | Signal processing |
lti_impulse | Returns a record {t, y, x}: the response from rest to an impulse at t = 0, with the arguments of lti_step | Signal processing |
lti_is_stable | Returns true when every pole is strictly inside the stable region: real part below 0 for a continuous system, magnitude below 1 for a discrete one | Signal processing |
lti_lsim | Returns a record {t, y, x}: the response to the input u sampled at times t, starting from state x0 | Signal processing |
lti_margin | Returns a record {gm, gm_db, pm, w_gm, w_pm, stable} for the loop transfer function sys closed with unity negative feedback | Signal processing |
lti_parallel | Returns the sum of two systems driven by the same input (a + b) as an "lti" model in state-space form | Signal processing |
lti_poles | Returns the poles as a complex vector: the eigenvalues of A, or the roots of the denominator (or the p given) for a system built by lti_tf or lti_zpk | Signal processing |
lti_series | Returns the cascade u -> a -> b -> y as an "lti" model in state-space form (the transfer function b * a) | Signal processing |
lti_ss | Returns the system x' = A x + B u, y = C x + D u (or x[k+1] = A x[k] + B u[k] when dt > 0) as an "lti" model | Signal processing |
lti_step | Returns a record {t, y, x}: the response from rest to a unit step applied at t = 0 | Signal processing |
lti_tf | Returns the single-input single-output system with transfer function num(s)/den(s) (or num(z)/den(z) when dt > 0) as an "lti" model | Signal processing |
lti_to_ss | Returns the same system with form = "ss": only the realization A, B, C, D, dt is kept | Signal processing |
lti_to_tf | Returns the same system with form = "tf" and fields num, den (highest power first) | Signal processing |
lti_to_zpk | Returns the same system with form = "zpk" and fields z, p (complex vectors) and k | Signal processing |
lti_zeros | Returns the zeros of the transfer function as a complex vector (empty when there are none) | Signal processing |
lti_zpk | Returns the single-input single-output system k * prod(s - z_i) / prod(s - p_i) as an "lti" model | Signal processing |
ltrim | Same parameters as trim, restricted to one end only (ltrim the left, rtrim the right) | Collections & strings |
lu | LU decomposition with partial pivoting of a square n×n Mat A, P·A = L·U | Core maths |
lyap | Solves the continuous Lyapunov equation A X + X A' + Q = 0 for X, with A and Q real n×n | Core maths |
M
mae | The regression-error trio, each taking a length-N vector of true values actual and a length-N vector of predictions predicted, and returning a single number: mae the mean absolute.. | Statistics & ML |
mag2db | Returns the same shape: 20*log10(x) | Signal processing |
magnitude | An exact alias of abs — the same match arm, so the two names cannot drift apart | Signal processing |
make_file | Creates an empty file at path (a Str), truncating it if it is already there — the same promise fopen(path, "w") makes, so the two agree | File I/O |
map | Returns a List: f applied to every element | Collections & strings |
markers | Added in v0.2.4. The signal's markers as a list of records with time and label, in time order | Signal processing |
markov_chain | Builds a discrete Markov chain from an (S, S) row-stochastic transition matrix P (every row must sum to 1 — rows that don't are rejected outright, never quietly renormalized) and an.. | Statistics & ML |
matlab_exec | The same contract as python_exec/js_exec, run through a local MATLAB installation instead: code's result is written to an injected qu_output_path variable (no leading underscore —.. | File I/O |
matmul | Matrix multiplication of A (r×k) and B (k×c), both Mat (inner dimensions must agree) | Core maths |
max | In the one-argument form on a Mat, the optional axis= keyword (0 or 1) reduces along just that dimension instead, returning a length-cols/rows Vec rather than a single scalar | Core maths |
maximum | Elementwise larger/smaller of two arguments — exactly max(a, b) / min(a, b) (which already worked elementwise), under the names NumPy users type | Core maths |
maxpool2d | Downsamples an (H, W) matrix x by taking the largest value in each size x size window (integer size), moving stride positions at a time (integer, defaults to size —.. | Statistics & ML |
md2html | Converts headings, paragraphs, lists, fenced code with its language, blockquotes, pipe tables, rules, and inline code/bold/italic/links/images | Collections & strings |
mean | Arithmetic mean of every element of x — a scalar, Vec, or Mat/Signal | Core maths |
measure_snr | Computes the achieved signal-to-noise ratio by treating noisy - clean as the noise | Noise |
medfilt | Replaces each sample by the median of window samples centred on it | Noise |
medfilt2 | Synonyms for medfilt at the Qu level: x is a length-N number vector or an Image, window an optional positional/named odd integer, default 3 | Noise |
median | Middle order statistic of x (a scalar, Vec, or Mat/Signal, flattened): the middle element for an odd-length input, the average of the two middle elements when len(x) is even | Core maths |
median_filter | Synonyms for medfilt at the Qu level: x is a length-N number vector or an Image, window an optional positional/named odd integer, default 3 | Noise |
mel_spectrogram | Mel-scale spectrogram: an stft power spectrogram folded onto perceptually-spaced bands by triangular filters laid out on mel = 2595*log10(1+f/700) | Signal processing |
mem_usage | Returns this process's resident-set size right now, in bytes (a Num) — what THIS run has actually mapped in, not the machine's total memory (sysinfo()'s job) | Concurrency |
meshgrid | The two coordinate matrices a surface or contour needs, from two axis vectors x (length nx) and y (length ny) | Core maths |
metadata | Added in v0.2.4. Returns a Record of the signal's metadata | Signal processing |
mid | Plain aliases of the same implementation (mid exists purely for BASIC/Excel discoverability) | Collections & strings |
min | In the one-argument form on a Mat, the optional axis= keyword (0 or 1) reduces along just that dimension instead, returning a length-cols/rows Vec rather than a single scalar | Core maths |
minimize | Returns a Model (kind "minimize") with fields params (length-P vector), value (a number), converged (a boolean) | Signal processing |
minimum | Elementwise larger/smaller of two arguments — exactly max(a, b) / min(a, b) (which already worked elementwise), under the names NumPy users type | Core maths |
minutely_profile | Returns a length-60 real vector | Signal processing |
mirror | Reverses row order (flipud, dim=1) or column order (fliplr/mirror, dim=2) of A, a Str, Vec, Mat, or Image | Core maths |
mismatch_loss | Returns -10 log10(1 - |Γ|²) in dB: the incident power not delivered to the load | Signal processing |
mkdir | Creates the directory path (a Str), including any missing parents — mkdir -p, not bare mkdir | File I/O |
mlp_classifier | Shortcut that builds a dense_layer(..., activation="relu") for every size in hidden_dims (a vector of positive integers, e.g. [64, 32]) followed by a final dense_layer(...,.. | Statistics & ML |
mm | Length units as functions, converting a scalar v (millimetres/centimetres/inches/points as named) to the figure's own coordinate space — a tenth of a millimetre, so mm(1) is 10,.. | Core maths |
mmap_len | Reports the mapped file's size | File I/O |
mmap_open | Memory-maps path (string, filesystem path) read-only | File I/O |
mmap_read | Reads a byte range out of a mapping without moving any cursor | File I/O |
mod | Returns a number: the remainder with the sign of the divisor, so -1 mod 3 is 2 rather than -1 | Collections & strings |
mode | The most frequent value in a numeric or categorical vector x of length N | Statistics & ML |
monte_carlo | Returns a length-n vector collecting every result | Signal processing |
monthly_profile | Returns a length-12 real vector, one bin per equal-width twelfth of a Julian year | Signal processing |
move | Exactly predict(dt) on a kind="particle_tracker" state — the row above — under a verb that says what the step is: for this filter the predict step really is a concrete constant-velocity.. | Statistics & ML |
move_file | Moves src to dst, falling back to copy-then-remove-the-original when a plain rename fails (e.g. across drives) — the on_exists collision check happens first either way, so the.. | File I/O |
mse | The regression-error trio, each taking a length-N vector of true values actual and a length-N vector of predictions predicted, and returning a single number: mae the mean absolute.. | Statistics & ML |
mtimes | Matrix multiplication of A (r×k) and B (k×c), both Mat (inner dimensions must agree) | Core maths |
mul | The operators as named functions, so an operation can be passed where a name is what you can pass | Core maths |
multi_head_attention | Runs several attention heads over the same (N, D) input x in parallel: heads is a tuple of n_heads (integer) Records, each with fields wq, wk, wv (per-head projection.. | Statistics & ML |
multi_otsu | The n_classes - 1-threshold generalization of otsu_threshold | Images |
multisine | Returns a length-n Signal. Sum of cosines at the given frequencies/amplitudes | Signal processing |
multithreshold | Quantizes into len(levels)+1 bands at the given cut points | Images |
mutex | Creates a shared mutable cell holding initial (any value, of any type — the mutex has no fixed element type) | Concurrency |
mutex_add | Atomic read-modify-write in a single lock acquisition (unlike mutex_set(m, mutex_get(m) + delta), which would race) | Concurrency |
mutex_get | Reads the current value out of mutex handle m | Concurrency |
mutex_set | Overwrites the value stored in mutex handle m with v (any value, any type), discarding the old one unconditionally — no read of the previous value is involved | Concurrency |
mutex_update | Atomic read-modify-write via an arbitrary user function called with the current value as its one argument — for accumulations mutex_add can't express (a running max, an append-only log) | Concurrency |
mutual_info_classif | k-nearest-neighbour mutual information between each column of an N-row, D-column X and a length-N discrete label vector y, using k neighbours (integer, default 3) | Statistics & ML |
mvnpdf | Multivariate Gaussian density at a length-D point x, with a length-D mean vector mu and a (D, D) covariance matrix Sigma, evaluated through Sigma's Cholesky factor rather than.. | Statistics & ML |
N
nadam | The Adam family of per-parameter adaptive-learning-rate optimizers, given params (a Tensor to optimize) and a learning rate lr (a number, default 0.001) | Statistics & ML |
naive_bayes_model | Gaussian naive Bayes classifier on an N-row, D-column X and a length-N categorical/integer target y, scored in log space so a product of small per-feature densities cannot.. | Statistics & ML |
nand | Returns a bool: logical NAND | Collections & strings |
native_call | Calls the C function name in a load_library handle, with its C signature stated as a string, because a library does not record its argument types | File I/O |
nbincdf | Cumulative negative binomial distribution P(X <= k), a step function of floor(k) | Statistics & ML |
nbinfit | Maximum-likelihood fit: a result with the named parameters r, p, plus .params (the same as a vector), .n and .loglik (the log-likelihood at the estimate) | Statistics & ML |
nbininv | Inverse of nbincdf: the smallest support point whose CDF reaches p (so nbininv(nbincdf(k, ...), ...) is k), for p in [0, 1] (outside is an error) | Statistics & ML |
nbinpdf | Probability mass of the negative binomial distribution at k (a number, vector or matrix, elementwise); zero at a non-integer or out-of-support k | Statistics & ML |
nbinrnd | Random draws from the negative binomial distribution | Statistics & ML |
nbinstat | Mean and variance of the negative binomial distribution with these parameters, as a result with fields .mean and .var | Statistics & ML |
nchoosek | The binomial coefficient n choose k for non-negative integers, computed exactly | Core maths |
ncol | Returns a number: the column count | Collections & strings |
neighbors | has_edge(g, a, b) returns a bool; neighbors(g, name) returns a List of Str node ids | Collections & strings |
nesterov_sgd | Plain stochastic gradient descent (sgd) and its look-ahead variant (nesterov_sgd, which evaluates the gradient after applying the momentum step rather than before it), given params (a.. | Statistics & ML |
newton | Returns a single number, the root | Signal processing |
nmf | Non-negative matrix factorization X ≈ W H of an N-row, D-column non-negative matrix X, by Lee & Seung's multiplicative updates on the Frobenius objective (a negative or non-finite.. | Statistics & ML |
nnls | Non-negative least squares by Lawson-Hanson, for when a negative coefficient would be physically meaningless — a concentration, a mass, a relaxation strength | Core maths |
nnz | Number of nonzero elements of a scalar, Vec, Mat or mask: nnz([0, 1, nan, 0, 2]) is 3 (NaN is nonzero, as in MATLAB) | Core maths |
nor | Returns a bool: logical NOR | Collections & strings |
norm | Euclidean (L2) norm; for a matrix this is the Frobenius norm (every element treated as one long vector), not a matrix operator norm | Core maths |
normal | Draws from a Gaussian. mu (number) is the mean; sigma (number) is the standard deviation; rows and cols (numbers, optional) give the shape of the draw, one number for a vector and.. | Statistics & ML |
normalize | Min-max scaling of X (a vector, an N-row/D-column matrix scaled column-wise, or a table scaled per numeric column) to [0, 1]: (x - min) / (max - min) | Statistics & ML |
normcdf | Normal cumulative distribution P(X <= x) at x (a number, vector or matrix, elementwise), mean mu, standard deviation sigma (positive) | Statistics & ML |
normfit | Maximum-likelihood fit: a result with the named parameters mu, sigma, plus .params (the same as a vector), .n and .loglik (the log-likelihood at the estimate) | Statistics & ML |
norminv | Inverse of normcdf: the x with normcdf(x) = p, for probabilities p in [0, 1] (anything outside is an error, not NaN); p = 0/1 give -inf/inf | Statistics & ML |
normpdf | Gaussian probability density at x (a number or vector, elementwise) with mean mu (default 0) and standard deviation sigma (default 1) | Statistics & ML |
normrnd | Random draws from the normal distribution | Statistics & ML |
normstat | Mean and variance of the normal distribution with these parameters, as a result with fields .mean and .var | Statistics & ML |
notch | Returns a Model (kind "filter", field sos, one section) | Signal processing |
now | Returns the current time (UTC) as a Record with integer fields .year, .month, .day, .hour, .minute, .second, plus .unix (number, Unix epoch seconds, for arithmetic) and.. | Concurrency |
nrow | Returns a number: the row count | Collections & strings |
null | Orthonormal basis of the null space of a real Mat (or column Vec) A, from the SVD: an n×(n-rank) Mat, so A*null(A) is zero to rounding | Core maths |
numel | Total element count of x: 1 for a scalar, its length for a Vec/CVec/Signal, rows*cols for a Mat, a Unicode-aware character count for a Str, and the element/node count for.. | Core maths |
nyquist | The standard EIS plot: Re(Z) on x, -Im(Z) on y (the impedance-spectroscopy sign convention every EIS instrument uses, so capacitive/inductive behavior plots in the upper half-plane) | Signal processing |
O
ode23 | Bogacki-Shampine 3(2), the cheaper low-order pair: better than ode45 at loose tolerances or when f is not smooth | Signal processing |
ode45 | Dormand-Prince 5(4) with adaptive step size and the 4th-order continuous extension, for non-stiff problems | Signal processing |
ode_stiff | Stiff solver: the Shampine-Reichelt Rosenbrock 2(3) pair (MATLAB's ode23s), A-stable, with a forward-difference Jacobian recomputed after every accepted step (n + 1 extra evaluations of.. | Signal processing |
ols_model | Fits ordinary least squares with an automatic intercept on an N-row, D-column feature matrix X and a length-N target vector y | Statistics & ML |
one_hot | One-hot encoding of a length-N label vector (numbers or a list of strings) with one column per distinct label in sorted order (numbers ascending, strings in byte order) | Statistics & ML |
ones | A vector or matrix of ones, with the same one-argument-vs-two-argument shape rules as zeros above | Core maths |
ones_like | A vector or matrix of the same shape as x (a Vec or Mat), filled with one or zero respectively — the shape is read directly from x, so it cannot fall out of step with it | Core maths |
optimizer_step | One optimizer update, for when you are writing the training loop yourself instead of calling train_loop: opt an optimizer Record (from sgd/adam/etc.), grads the gradient value.. | Statistics & ML |
or | Returns a bool. Both short-circuit: the right side is not evaluated when the left already decides the answer, so i < len(xs) and xs[i] > 0 is a safe guard | Collections & strings |
ord | Returns a one-character Str from chr, and a number — the code point — from ord | Collections & strings |
orth | Orthonormal basis of the range (column space) of a real Mat A: an m×rank Mat from the left singular vectors, same rank tolerance as null; a zero matrix gives an m×0 Mat | Core maths |
otsu | Compute-and-apply convenience: otsu_threshold followed immediately by threshold in one call | Images |
otsu_threshold | Computes (does not apply) the classic Otsu optimal threshold from x's histogram (Image reads per-pixel luma; Vec/Signal read their own values) | Images |
outer | Outer product u·vᵀ: a len(u)×len(v) Mat of u[i]·v[j], whatever the orientation of the two vectors | Core maths |
overshoot | Returns a single number, a percent of the step's own size abs(final - initial): overshoot is how far the response travels *past its settled value* in the direction the step was going,.. | Signal processing |
P
pack | Returns a byte buffer, a Vec of integers in 0..=255 | Collections & strings |
pad_left | Pads on the left to width characters; a string already that wide is returned unchanged, never truncated | Collections & strings |
pad_right | Same parameters and return as pad_left, padding on the right instead | Collections & strings |
palette | Generates n (integer) categorical colours of equal perceptual weight by walking hue at fixed saturation/value | Plotting |
panel | Selects cell k (integer, 1-based, row-major) of a rows-by-cols (integers) grid as the target for further drawing | Plotting |
parallel | Two or more circuits in parallel; admittances add | Signal processing |
param | Wraps a plain number, vector, or matrix v as a fresh, differentiable Tensor — a new leaf node on the autodiff tape with no inputs of its own, so grad treats it as something to.. | Statistics & ML |
parse_as | scanf backwards: "hello world 12".parse_as("hello world %d") gives 12 | Collections & strings |
parse_csv | Converts str (string, CSV text) to a Table — exactly read_csv's own parsing (Table::from_csv, the headers=true, sep=",", decimal="." defaults; use read_csv on a real file for.. | File I/O |
parse_json | jsonify's inverse. str (string) is JSON text — either a jsonify/save-style {"type": ...} envelope, or ordinary JSON from anywhere else (e.g. an HTTP API response), which is mapped.. | File I/O |
parse_xml | xmlify's inverse. str (string) is XML text in xmlify's own element-naming convention | File I/O |
particle_filter | The specialized constant-velocity tracker: n_particles (integer), initial_state (a length-D position/velocity vector), process_noise/obs_noise (numbers, the built-in noise levels.. | Statistics & ML |
particle_filter_init | Generic particle filter state: x0 a length-D centre vector, n (integer) the particle count scattered around it with spread spread (a number, default 1.0), and an optional integer.. | Statistics & ML |
pause | Freezes the count, keeping the accumulated total so start resumes from where it left off | REPL & diagnostics |
pca | Projects an N-row, D-column matrix X onto its top k principal components (columns mean-centered first) | Statistics & ML |
pca_components | Fits the same PCA as pca on X and k, returning the (k, D) loading matrix instead — each row is a unit-length direction in the original D-dimensional feature space | Statistics & ML |
pca_explained_variance | Fits the same PCA as pca on X and k, returning a length-k vector giving the fraction of the total variance in X that each kept component carries, in decreasing order | Statistics & ML |
pca_model | PCA as a reusable handle: fits the top k principal components on an N-row, D-column matrix X, so .predict(Xnew) projects new rows onto the same fitted components instead of.. | Statistics & ML |
peak | max(abs(x)) over every element of x — a scalar, Vec, or Mat/Signal, flattened | Core maths |
peek | On a fifo handle q: push(q, x) adds x at the back (returns Nothing); pop(q) removes and returns the front element; peek(q) looks at it without removing | Collections & strings |
peek_byte | Looks at the next raw byte of f (file handle, opened readable) without consuming it | File I/O |
peek_char | Looks at the next character of f (file handle, opened readable) without consuming it | File I/O |
peek_line | Looks at the next line of f (file handle, opened readable) without consuming it | File I/O |
percentile | Same computation as quantile, with p on a 0..100 scale instead of 0..1 (p=50 is the median) | Core maths |
periodic_profile | Returns a length-n_bins real vector, one summary statistic per bin | Signal processing |
periodogram | Returns a spectrum of N/2 + 1 one-sided bins stamped norm = "density", same scaling as welch (changed in v0.2.4 from a bare vector, back-compatibly — see welch) | Signal processing |
permutation_importance | Shuffles one column of an N-row, D-column X at a time and re-scores an already-fitted model Record model against the matching length-N target y, over n_repeats shuffles per.. | Statistics & ML |
phase | Complex argument — the angle from the positive real axis, in radians (atan2(im, re)) — on a Complex/CVec/CMat; on a signed real scalar or real Vec/Mat it degrades to 0 for a.. | Core maths |
pid_init | A discrete PID controller's initial state | Signal processing |
pie | Ordinary pie chart — same call shape as donut (values a Vec of numbers, trailing strings optional slice labels) with donut=false | Plotting |
pinv | Moore-Penrose pseudo-inverse (SVD-based) of A, an r×c Mat or CMat | Core maths |
pipeline | Composes one or more stage names (strings naming functions already defined in the program) into a single unfitted pipeline spec — every stage but the last must be a function (X) -> X; the.. | Statistics & ML |
plot | Draws a basic line (or, with a positional or marker= marker string such as "o", a scatter-style) plot of y versus x | Plotting |
pls_model | Partial least squares regression (PLS2, NIPALS) with k components on centered X (N x D) and Y (a length-N vector or an N x Q matrix) | Statistics & ML |
pmap | Returns a List: f applied to every element | Collections & strings |
point | Marks a single position (x, y) (numbers, data units) with a dot | Plotting |
poisscdf | Cumulative Poisson distribution P(X <= k), a step function of floor(k) | Statistics & ML |
poissfit | Maximum-likelihood fit: a result with the named parameters lambda, plus .params (the same as a vector), .n and .loglik (the log-likelihood at the estimate) | Statistics & ML |
poissinv | Inverse of poisscdf: the smallest support point whose CDF reaches p (so poissinv(poisscdf(k, ...), ...) is k), for p in [0, 1] (outside is an error) | Statistics & ML |
poisson | Exact Poisson draws. lambda (a positive number) is the rate, which is also the mean and the variance of the result; rows and cols (numbers, optional) give the shape of the draw, one.. | Statistics & ML |
poisspdf | Probability mass of the Poisson distribution at k (a number, vector or matrix, elementwise); zero at a non-integer or out-of-support k | Statistics & ML |
poissrnd | Random draws from the Poisson distribution | Statistics & ML |
poisstat | Mean and variance of the Poisson distribution with these parameters, as a result with fields .mean and .var | Statistics & ML |
polarplot | Converts polar coordinates theta (Vec of numbers, radians) and r (Vec of numbers, radius) to Cartesian (x=r·cos θ, y=r·sin θ) and draws an ordinary line/scatter series | Plotting |
poles | Returns a complex vector (CVec), one entry per pole across all sections/taps | Signal processing |
poly | Coefficients (highest power first, leading 1) of the monic polynomial with the roots r, a Vec, CVec or scalar; poly([]) is [1] | Statistics & ML |
polyder | Derivative of the polynomial with real coefficient Vec p (highest power first); returns a Vec one shorter than p with leading zeros removed, and [0] for a constant | Statistics & ML |
polyfit | Fits a least-squares polynomial of the given integer degree to a length-N vector x and a length-N vector y | Statistics & ML |
polygon | Draws a closed shape connecting the points (xs[i], ys[i]) in order and back to the first | Plotting |
polyint | Antiderivative of the polynomial with real coefficient Vec p: a Vec one longer than p, whose last entry is the constant of integration k (a number, default 0) | Statistics & ML |
polyval | Evaluates a coefficient vector coeffs (as returned by polyfit, highest-degree first) at x, either a single number or a length-N vector, by Horner's method | Statistics & ML |
pool | Returns a Pool handle, unregistered and scoped to wherever it's used | Concurrency |
pop | On a fifo handle q: push(q, x) adds x at the back (returns Nothing); pop(q) removes and returns the front element; peek(q) looks at it without removing | Collections & strings |
pop_back | Removes and returns the element from the front (pop_front) or back (pop_back) in O(1) | Collections & strings |
pop_front | Removes and returns the element from the front (pop_front) or back (pop_back) in O(1) | Collections & strings |
porous | sqrt(Rp Zi)/tanh(sqrt(Rp/Zi)), Zi = 1/(Q (jw)^n) — de Levie porous electrode | Signal processing |
pow | The operators as named functions, so an operation can be passed where a name is what you can pass | Core maths |
pow2db | Returns the same shape: 10*log10(x) | Signal processing |
pr_curve | Precision-recall curve of score against 0/1 labels actual | Statistics & ML |
precision | Classification metrics on a length-N vector of true labels actual and a length-N vector of predicted labels predicted, each returning a single number macro-averaged over every class.. | Statistics & ML |
predict | Applies a fitted model Record model to a new M-row (same D columns as it was fitted on) matrix or vector Xnew | Statistics & ML |
primes | All primes <= n as an ascending Vec, by a sieve of Eratosthenes; n < 2 gives an empty Vec | Core maths |
print | Writes its arguments, space-separated, and a newline, to stdout | Collections & strings |
printtex | Same conversion as tex(x) on value x (number, Vec, Mat, or complex), but prints it directly instead of returning a string | Plotting |
process | Returns the processed signal, applying p's function block by block and carrying state across the block boundaries | Signal processing |
processor | Returns a Model (kind "processor") with fields fn, block, latency (samples), stateful, plus state when stateful and rate/latency_ms when a rate was given | Signal processing |
prod | Product of every element of x — a scalar, Vec, or Mat/Signal, real only (unlike sum, does not accept a CVec/CMat) | Core maths |
profile_end | Closes the window and returns a Record with fields time (elapsed seconds) and mem (RSS delta in bytes, NaN if either sample was NaN, e.g. on an unsupported platform) | REPL & diagnostics |
profile_start | Starts a named profiling window and returns a Record handle -- t0 (wall-clock seconds) and mem0 (RSS bytes, NaN if unsupported) -- to pass unmodified to profile_end | REPL & diagnostics |
profile_stats | profiling_mode takes one argument, a boolean (true to start recording, false to stop), and returns none | REPL & diagnostics |
profiling_mode | profiling_mode takes one argument, a boolean (true to start recording, false to stop), and returns none | REPL & diagnostics |
progress | A tqdm-style progress bar, called once per loop iteration: i is the 0-based index (0 through n - 1), n is the total count | REPL & diagnostics |
proper | Uppercases every word's first character, lowercases the rest — VB's StrConv(s, vbProperCase) | Collections & strings |
psd | Returns a spectrum of nfft/2 + 1 one-sided bins stamped norm = "density", the Welch PSD in SciPy's "density" scaling, exactly as welch does — literally the same code path, so.. | Signal processing |
pt | Length units as functions, converting a scalar v (millimetres/centimetres/inches/points as named) to the figure's own coordinate space — a tenth of a millimetre, so mm(1) is 10,.. | Core maths |
pulse_frequency | Returns a single number: the mean interval between successive rising crossings (pulse_period) or its reciprocal (pulse_frequency) — seconds and Hz for a Signal, samples and.. | Signal processing |
pulse_period | Returns a single number: the mean interval between successive rising crossings (pulse_period) or its reciprocal (pulse_frequency) — seconds and Hz for a Signal, samples and.. | Signal processing |
pulse_width | Returns a single number: the mean width of the complete pulses, in seconds for a Signal and samples otherwise | Signal processing |
pump_watches | Checks every registered watch ... end (§ Watches, below) exactly ONCE, right now, against its real current external state, firing the body of any whose state has genuinely changed since.. | Concurrency |
push | On a fifo handle q: push(q, x) adds x at the back (returns Nothing); pop(q) removes and returns the front element; peek(q) looks at it without removing | Collections & strings |
push_back | Grows l at the back (push_back) or front (push_front) in O(1) | Collections & strings |
push_front | Grows l at the back (push_back) or front (push_front) in O(1) | Collections & strings |
pwd | cur_dir says what it gives back and pwd is what anyone who has used a shell types first, so both spellings exist rather than one being renamed out from under existing scripts | File I/O |
pwl | Continuous piecewise-linear least-squares fit through equal-length numeric Vecs x, y | Plotting |
pwm | Natural-sampling pulse-width modulation: modulator is a Vec of numbers (any signal, conventionally in [-1, 1]), carrier_freq and fs are numbers (Hz) | Plotting |
python_exec | Runs code (string, source in the guest language) as a subprocess | File I/O |
pzplot | Pole-zero plot (MATLAB's zplane concept): an x marker at each pole, o at each zero, and the unit circle as a reference polyline, titled with the filter's stability verdict | Signal processing |
Q
q_learning | Tabular temporal-difference learning on a gridworld_env env for an integer number of episodes, with learning rate alpha, discount factor gamma, and epsilon-greedy exploration rate.. | Statistics & ML |
qam_demodulate | Nearest-constellation-point decision, the exact inverse of qam_modulate on clean symbols | Signal processing |
qam_modulate | Maps each group of log2(order) bits to one point of the standard Gray-coded square constellation — the first half of the group labels the in-phase level, the second half the quadrature one | Signal processing |
qda_model | Quadratic discriminant analysis: like lda_model but each class has its own covariance, so the boundaries are quadratic | Statistics & ML |
qr | Thin QR decomposition of A (r×c Mat), A = Q·R | Core maths |
quad | Adaptive Gauss-Kronrod (G7K15, QUADPACK's rule and error scaling) integral of f(x) over [a, b]; f takes and returns a number | Signal processing |
quad_info | quad returning a record {value, error, nfev, intervals, status} instead of failing: error is the estimated absolute error, nfev the number of evaluations of f, status is "ok",.. | Signal processing |
quadprog | Convex quadratic programming: minimises 0.5 x'Hx + f'x subject to A x <= b, Aeq x = beq and lb <= x <= ub, with the same constraint conventions, bound defaults (-Inf/+Inf) and.. | Signal processing |
quantile | Linear-interpolation quantile (NumPy's default interpolation="linear" method) | Core maths |
quantile_normalize | Rank-based scaling of X (vector, matrix column-wise, or table per numeric column): each value is replaced by its rank against its own column, rescaled uniform onto [0, 1] | Statistics & ML |
queue | Creates an empty deferred-job list | Concurrency |
quick_mlp | Fits a single-hidden-layer multilayer perceptron in one call on an N-row, D-column feature matrix X and a length-N target vector y (or an (N, n_classes) one-hot matrix for.. | Statistics & ML |
R
raincloud | Allen et al. (2019) raincloud plot: one group per argument (each a Vec of numbers) at x = 0, 1, 2, ..., each rendered as a Gaussian KDE "cloud" + boxplot + jittered raw points ("rain") | Plotting |
rand | Draws from the uniform distribution on [0, 1) | Statistics & ML |
randi | Draws random integers. lo (number) is the smallest value that can come out; hi (number) is the largest, inclusive at both ends (MATLAB's convention, not NumPy's half-open one, so.. | Statistics & ML |
randn | Draws from the standard normal distribution (mean 0, std 1), same rows/cols/seed= shape as rand | Statistics & ML |
random_forest_model | Bagged ensemble of n_trees (a positive integer) CART trees on an N-row, D-column X and length-N y, each tree grown on its own bootstrap resample of the rows and a.. | Statistics & ML |
random_walk | Generates a discretized Wiener-process path: n_steps (a positive integer) increments, each drawn ~ Normal(drift, volatility), cumulatively summed, with an optional integer seed= | Statistics & ML |
range | Inclusive numeric range as a Vec, from a to b (both scalars) in increments of step (an optional positional scalar, default 1 — step= as a keyword is rejected, unlike most.. | Core maths |
range_decode | Inverse of range_encode: enc is the Record that call returned; as_str (named boolean, default false) asks for text instead of bytes | File I/O |
range_encode | Byte-oriented adaptive range coding of data (a Str, or a Vec of 0-255 byte values) | File I/O |
rank | Numerical rank of A (an r×c Mat or CMat) — the count of singular values clearing the tolerance | Core maths |
rans_decode | Inverse of rans_encode: enc is the Record that call returned; as_str (named boolean, default false) asks for text instead of bytes | File I/O |
rans_encode | rANS entropy coding of data (a Str, or a Vec of 0-255 byte values) — a static frequency table, unlike range_encode's adaptive model, so the table travels with the payload | File I/O |
rcond | Reciprocal condition number of a square matrix in the 1-norm, 1 / (norm(A, 1) * norm(inv(A), 1)), between 0 (singular) and 1 (perfectly conditioned, rcond(eye(n)) = 1), the quantity.. | Core maths |
re | Real component of a Complex/CVec/CMat (identity — x passed through unchanged — when x is already real) | Core maths |
read | swap atomically exchanges front and back (returns Nothing); read returns the stable front value | Collections & strings |
read_all | Reads every remaining byte from f (file handle, opened readable) | File I/O |
read_all_text | Reads path (string) in full. Returns the whole file's content as one string | File I/O |
read_array | Reads a whole binary file as one typed array, without an explicit fopen | File I/O |
read_bin | Reads up to n (a number) raw bytes from f (file handle, opened readable) | File I/O |
read_bit | Reads one bit from f (file handle, opened readable), MSB-first, advancing a sub-byte cursor that only moves to the next byte once all 8 bits of it are consumed | File I/O |
read_byte | Reads one raw byte from f (file handle, opened readable) | File I/O |
read_bytes | Blocks up to the handle's timeout_ms, returning a Vec of 0-255 integer values — possibly fewer than n if the timeout elapses first | Concurrency |
read_char | Reads one character from f (file handle, opened readable), UTF-8 aware | File I/O |
read_chars | Reads exactly n (number, count of Unicode characters, UTF-8 aware) characters from f (file handle, opened readable) | File I/O |
read_csv | Reads a CSV file into a Table | File I/O |
read_double | Reads a 64-bit IEEE-754 float from f (file handle, opened readable) | File I/O |
read_float | Reads a 32-bit IEEE-754 float from f (file handle, opened readable) | File I/O |
read_input | Reads one line of interactive input, returned as a string with its trailing newline stripped | File I/O |
read_int | The width-as-a-value counterpart of the fixed-width family above: reads bytes (a number, 1/2/4/8 only) from f (file handle, opened readable) and decodes them as an integer, with.. | File I/O |
read_int16 | Reads a signed 16-bit integer from f (file handle, opened readable) | File I/O |
read_int32 | Reads a signed 32-bit integer from f (file handle, opened readable) | File I/O |
read_int64 | Reads a signed 64-bit integer from f (file handle, opened readable) | File I/O |
read_line | Reads one line from f (file handle, opened readable) | File I/O |
read_mat | Reads a MATLAB .mat file (via the matfile crate) without needing a MATLAB installation | File I/O |
read_npy | Reads a NumPy .npy file (format versions 1-3, little- or big-endian, C or Fortran order) without NumPy | File I/O |
read_npz | Reads a NumPy .npz archive (stored or DEFLATE members, CRC-checked) as a record with one field per array, named without the .npy suffix; each array is converted as read_npy does | File I/O |
read_struct | Reads one fixed-width binary record from f (file handle, opened readable) | File I/O |
read_structs | Reads up to n (number) fixed-width binary records from f (file handle, opened readable), using the same fields layout read_struct takes | File I/O |
read_uint16 | Reads an unsigned 16-bit integer from f (file handle, opened readable) | File I/O |
read_uint32 | Reads an unsigned 32-bit integer from f (file handle, opened readable) | File I/O |
read_uint64 | Reads an unsigned 64-bit integer from f (file handle, opened readable) | File I/O |
read_until | Reads from f (file handle, opened readable) up to and including the next occurrence of delimiter (string), consuming it | File I/O |
read_values | Reads n (number, count) typed values from an already-open handle | File I/O |
read_version | The content of one saved version of path as a Str | File I/O |
real | Real component of a Complex/CVec/CMat (identity — x passed through unchanged — when x is already real) | Core maths |
recall | Classification metrics on a length-N vector of true labels actual and a length-N vector of predicted labels predicted, each returning a single number macro-averaged over every class.. | Statistics & ML |
rect | Draws an axis-aligned rectangle | Plotting |
rectangle | Draws an axis-aligned rectangle | Plotting |
reduce | Returns the final accumulated value (whatever type f produces) | Collections & strings |
reflection_coefficient | Returns Γ = (z - z0)/(z + z0), complex | Signal processing |
regex_count | Returns a number: how many non-overlapping matches occur | Collections & strings |
regex_find | Returns a Str (the first match) or none — not an empty string, so "matched empty" and "did not match" stay apart | Collections & strings |
regex_find_all | Returns a List of Str — every match, in order | Collections & strings |
regex_groups | Returns a List of Str — the capture groups of the first match, group 1 onward; a group that did not participate is an empty string | Collections & strings |
regex_match | Returns a bool: whether the pattern occurs anywhere in s | Collections & strings |
regex_replace | Replaces every match of the regular expression pattern in s with repl | Collections & strings |
regex_split | Returns a List of Str, split on every match of the pattern | Collections & strings |
regionprops | Takes that result and returns a List of one Record per blob, in label-id order, each with fields: label (integer id), area (pixel count), centroid_x, centroid_y (real.. | Images |
regions | Added in v0.2.4. The signal's regions as a list of records with start, end and label, in start order | Signal processing |
relu | Elementwise activation applied to a number, vector, or matrix x of any shape — relu clips negative values to zero, sigmoid squashes to (0, 1) | Statistics & ML |
rem | Remainder with the sign of the dividend (MATLAB rem, C fmod): rem(-7, 3) is -1, rem(7, -3) is 1 | Core maths |
remez | Returns the Parks-McClellan equiripple linear-phase FIR filter as a Model (kind "filter", field b), like fir1 | Signal processing |
remove | Two overloads, picked by the type of the second argument: text (Str) deletes every occurrence of it; start (number, 0-based index) with optional count (number of characters,.. | Collections & strings |
remove_dir | Deletes the directory path, to the Recycle Bin/Trash by default and outright with permanent=true, as remove_file | File I/O |
remove_file | Deletes path (a Str) to the OS Recycle Bin/Trash by default, so it can be recovered; permanent=true deletes it outright (*default changed in v0.4.5*; the older recycle_bin=false.. | File I/O |
remove_nan | x with the missing samples dropped | Noise |
remove_noise | x is a length-N number vector or Signal. method="wiener" (default): a local adaptive Wiener filter — for each sample, compares the local variance in a window-wide neighborhood.. | Noise |
remove_outliers | The same criterion, with the flagged samples dropped | Noise |
remove_small_blobs | Drop connected components below that area, after labelling internally (identical operation to bwareaopen above) | Images |
rename_file | Renames old to new (both Str), generally within the same filesystem | File I/O |
repeat_str | s * n is the shorter spelling for the same thing; the function is not called repeat because that is a loop keyword | Collections & strings |
replace | Every literal (non-regex) occurrence of old in s is replaced by new | Collections & strings |
replace_outliers | The same criterion, with the flagged samples patched in place | Noise |
repmat | Tiles A m times down and n times across: repmat([1, 2; 3, 4], 2, 3) is 4×6 | Core maths |
resample_int | Rational rate change by L/M in a single pass: zero-stuff by L, filter once, decimate by M | Signal processing |
resample_to | Returns a new Signal at Fs=new_fs, whose length is whatever it takes to span the *same* start/end time as the input (generally not N) | Signal processing |
reset | Returns the environment env's starting state — a plain integer state index | Statistics & ML |
reshape | Reinterprets a value as a matrix of a given shape | Core maths |
resistor | R | Signal processing |
resize | Returns a new Image of exactly width x height pixels | Images |
restart | Returns a number: the elapsed time up to this call (the completed "lap"), then resets the object to zero and immediately starts it running again — a one-call lap/checkpoint pattern for.. | REPL & diagnostics |
restore_version | Writes that version back to path, first keeping the current content as a new version, so a restore can itself be undone | File I/O |
return_loss | Returns -20 log10 |Γ| in dB, positive for a passive load — the engineering convention in which "20 dB return loss" means well matched | Signal processing |
reverse | Unicode-aware character reversal for a Str (same type back); element-order reversal for a List/Vec/Mask (same type and shape back) | Collections & strings |
rewind | Resets f's (file handle, opened readable) read cursor to the beginning — exactly seek(f, 0) | File I/O |
rfe | Recursive feature elimination on an N-row, D-column X and length-N y, down to an integer target n_features: repeatedly drops the weakest-scoring remaining column and refits | Statistics & ML |
rfft | Real-optimized half-spectrum FFT | Signal processing |
rgb | Builds a colour from channel numbers: r, g, b (and, for rgba, a fourth channel a) | Plotting |
rgba | Builds a colour from channel numbers: r, g, b (and, for rgba, a fourth channel a) | Plotting |
ridge | Tikhonov-regularized (L2) least squares on an N-row, D-column feature matrix X and a length-N target vector y, with regularization strength alpha (a non-negative number; plain.. | Statistics & ML |
ridge_model | The same fit as ols_model on an N-row, D-column X and a length-N y, but with L2 regularization strength alpha (a non-negative number) shrinking the coefficients toward zero;.. | Statistics & ML |
right | The last n characters of a string | Collections & strings |
rise_time | Returns a single number: the transition time of the first complete rising (resp | Signal processing |
rising_edges | Returns a vector of the interpolated crossing positions of one polarity only — seconds for a Signal, samples otherwise (the same convention find_pulses's widths field uses) | Signal processing |
rk4 | Classical fixed-step Runge-Kutta of order 4 with step h > 0; the last step is shortened to land exactly on tf, and every step is reported | Signal processing |
rlkk_extrapolate | Returns a single length-M CVec, not a model | Signal processing |
rlkk_reconstruct | Returns a Model (kind "rlkk") with fields z (a length-N CVec, the reconstructed spectrum) and gamma (a length-M real vector, the fitted DRT coefficients) | Signal processing |
rlkk_validate | Returns a Model (kind "rlkk_validation") with fields valid (a boolean, true iff every point's percent residual is under threshold), residuals (a length-N real vector, percent),.. | Signal processing |
rms | Root-mean-square, sqrt(mean(x.^2)), of every element of x — a scalar, Vec, or Mat/Signal, flattened | Core maths |
rmse | The regression-error trio, each taking a length-N vector of true values actual and a length-N vector of predictions predicted, and returning a single number: mae the mean absolute.. | Statistics & ML |
rmsprop | Per-parameter learning rates derived from the running gradient history, given params (a Tensor to optimize) and lr (a number, default 0.001) | Statistics & ML |
robust_scale | Outlier-resistant scaling of X (vector, matrix column-wise, or table per numeric column): (x - median) / IQR | Statistics & ML |
roc_curve | ROC curve of any real-valued score against 0/1 labels actual | Statistics & ML |
rolling_max | Maximum over a centred window. Same shape/type rules as rolling_mean | Noise |
rolling_mean | Mean over a window centred on each sample | Noise |
rolling_min | Minimum over a centred window. Same shape/type rules as rolling_mean | Noise |
rolling_rms | Root-mean-square over a centred window — a moving level, e.g. for an RMS trigger threshold | Noise |
rolling_std | Sample (N-1, unbiased) standard deviation over a centred window, matching std/var exactly, so rolling_std(x, w)[i] equals std of that window — a property you can check | Noise |
roots | Roots of the polynomial whose coefficients p (a real Vec, highest power first, the order polyfit/polyval use) are given, as the eigenvalues of the companion matrix | Statistics & ML |
rot90 | Rotates A (a Mat, or anything coercible to one) 90°×k counterclockwise; k is an optional scalar defaulting to 1, may be negative for clockwise rotation, and is taken mod 4 | Core maths |
round | Standard rounding functions, elementwise: floor toward negative infinity, ceil toward positive infinity, round to the nearest integer (half away from zero) | Core maths |
row_mean | Collapses each row of M (an r×c Mat, or anything coercible to one) to one number, returning an r×1 column Mat (not a plain Vec) | Core maths |
row_sum | Collapses each row of M (an r×c Mat, or anything coercible to one) to one number, returning an r×1 column Mat (not a plain Vec) | Core maths |
rows | Row / column count of A. On a Vec (shape (n, 1)), a Mat/Signal (shape (r, c)), or a bare scalar (shape (1, 1)), returns the corresponding dimension as a scalar Num | Core maths |
rtrim | Same parameters as trim, restricted to one end only (ltrim the left, rtrim the right) | Collections & strings |
run_for | Drives every registered every/after/at timer across a simulated virtual timeline, not a real wall-clock sleep | Concurrency |
run_for_stats | Reports how the most recent run_for went against the wall clock, as a record {steps, overruns, max_lateness_ms, mean_lateness_ms, paced, pace, wall_ms, lateness_ms} | Concurrency |
S
sandbox_mode | Refuses file and network access for the rest of the session and returns none | REPL & diagnostics |
sarsa | Tabular temporal-difference learning on a gridworld_env env for an integer number of episodes, with learning rate alpha, discount factor gamma, and epsilon-greedy exploration rate.. | Statistics & ML |
sauvola_threshold | Sauvola's local threshold, T = mean * (1 + k * (stddev/r - 1)) computed per pixel over window_size, purpose-built for document/text images whose illumination drifts across the frame — a.. | Images |
save | Writes the named variables — path (string, destination file) plus one or more variable names (strings) given explicitly as extra arguments — to a JSON file, each tagged with its own type | File I/O |
save_all | Saves literally every current binding — every user variable plus Qu's own built-in constants (pi, e, tau, none, the Qu* escape-character constants, ...) — to path (string) | File I/O |
save_image | Encodes img and writes it to path, dispatching on the path's own extension: .png writes a real (if uncompressed) PNG; .jpg/.jpeg writes a baseline JPEG; .tif/.tiff writes an.. | Images |
save_model | Writes a fitted kind="sequential" model Record m (from sequential/compile/quick_mlp/mlp_classifier/etc.) to an HDF5 file at the string path, weights and all, in a.. | Statistics & ML |
save_svg | Writes a standalone SVG document with an XML declaration, the SVG namespace, and both width/height and a matching viewBox — a viewBox alone renders at the container's size rather.. | Images |
savefig | Exports the current figure to path (string, a filesystem path); format is chosen by the file extension | Plotting |
savgol | Savitzky-Golay: fits a degree-order polynomial over each window-wide neighbourhood and keeps its centre value, preserving peak height/width that a moving average would flatten | Noise |
sawtooth | Each generates one period-repeating waveform: freq (number, Hz), fs (number, sample rate in Hz), n (integer, sample count) are all scalars, in that order | Plotting |
scaled_dot_product_attention | Core attention computation: an (Nq, D) query matrix q, an (Nk, D) key matrix k, and an (Nk, Dv) value matrix v (k and v share the same row count Nk) | Statistics & ML |
scan | scanf backwards: "hello world 12".parse_as("hello world %d") gives 12 | Collections & strings |
scatter | Same machinery as plot — x, y are equal-length Vecs of numbers — but defaults its marker to "o" (dots) instead of "line" | Plotting |
scatterfit | Draws a scatter of equal-length numeric Vecs x, y plus a polyfit trend line | Plotting |
schur | Real Schur decomposition of a dense real square matrix, returned as a record {T, U} with U orthogonal, T real quasi-upper-triangular (1×1 blocks for real eigenvalues, 2×2 blocks for.. | Core maths |
sci | Returns a Str. A value whose exponent is 0 prints as the bare mantissa (1.50), and a value that rounds up into the next power of ten carries into the exponent (9.999e4 at 2 digits is.. | Collections & strings |
score | Scores a fitted model Record model against an N-row feature matrix X and, for a supervised kind, the matching length-N target vector y | Statistics & ML |
sech | The other three hyperbolics: coth(x) = cosh(x)/sinh(x), sech(x) = 1/cosh(x), csch(x) = 1/sinh(x) | Core maths |
seed | Reseeds the shared random stream with integer n, so subsequent calls to rand/randn/etc | Statistics & ML |
seek | Moves f's (file handle, opened readable) read cursor | File I/O |
select | Returns a Table containing only the named columns, in the order given | Collections & strings |
semaphore | Creates a counting semaphore with n (integer, must be non-negative) initial permits | Concurrency |
semaphore_acquire | Blocks the calling thread until a permit is free on semaphore handle s, then takes it (decrementing the available count by one) | Concurrency |
semaphore_available | Non-blocking snapshot of how many permits are free right now on semaphore handle s | Concurrency |
semaphore_release | Returns one permit to semaphore handle s (incrementing the available count by one) | Concurrency |
semilogx | Plots equal-length numeric Vecs x, y like plot and additionally sets the x-axis to log scale | Plotting |
semilogy | Plots equal-length numeric Vecs x, y like plot and additionally sets the y-axis to log scale | Plotting |
sequential | Initializes a stack of layer specs (a list of dense_layer/dropout_layer Records, or a single one) into a trainable model: weights use He initialization (sqrt(2/in_dim)) on a layer.. | Statistics & ML |
sequential_split | The same shape as train_test_split on X/y/test_size, but never shuffles: the first rows become the training set, the last rows the test set, in their original order | Statistics & ML |
serial_open | Opens a real OS serial port. port (string) is the OS device name, e.g. "COM3" on Windows or "/dev/ttyUSB0" on Linux/macOS | Concurrency |
serial_ports | Lists the short names of every serial device the OS currently reports (e.g. "COM3" on Windows, "/dev/ttyUSB0" on Linux/macOS) | Concurrency |
series | Two or more circuits in series; impedances add | Signal processing |
set | get returns the stored value (any type) or default (none when you give none) if key is absent -- the optional third argument is new in v0.4.7; before it was accepted and ignored | Collections & strings |
set_metadata | Added in v0.2.4. Writes one field of the named schema: channel, comment, experiment, gain, instrument, offset, operator, sample, sampling_rate, sensor, start_time,.. | Signal processing |
set_start_time | Added in v0.2.4. Dates the signal: sets the time of sample 0 in seconds | Signal processing |
sfdr | With no excitation named, the largest non-DC FFT bin is taken as the fundamental (the single-tone case); tones=/freqs= (a vector, Hz, needs fs=/rate= too) or bins= (a vector of.. | Signal processing |
sgd | Plain stochastic gradient descent (sgd) and its look-ahead variant (nesterov_sgd, which evaluates the gradient after applying the momentum step rather than before it), given params (a.. | Statistics & ML |
shape | The full shape of A as a 2-element Vec, [rows, cols], using the same per-type shape rules as rows/cols above | Core maths |
sharpen | Applies a fixed 3x3 unsharp-mask sharpen kernel | Images |
shell | Hands command (a Str) to the OS shell and returns immediately, without waiting — Visual Basic's Shell, which is where the window styles come from too | File I/O |
shortest_path | Returns a number (the shortest total edge weight, via Dijkstra) or none if to is unreachable from from — disconnected is an answer, not an error | Collections & strings |
sigma_delta | Returns a same-length vector or Signal (preserving x's Fs when it's a Signal), each sample +1/-1 | Signal processing |
sigmoid | Elementwise activation applied to a number, vector, or matrix x of any shape — relu clips negative values to zero, sigmoid squashes to (0, 1) | Statistics & ML |
sign | The sign of each element, using Rust's f64::signum semantics: -1 for a negative value (including -0.0), +1 for a non-negative value (including +0.0 — so sign(0) returns 1,.. | Core maths |
signal | Tags Vec x (numbers) with sample rate fs (number, Hz), so later calls (like rfft) do not have to be told it again | Plotting |
signal_slice_time | Returns a new Signal at the same Fs | Signal processing |
signal_unit | Added in v0.2.4. With one argument, reads the sample unit (Nothing if unset) | Signal processing |
silhouette | Per-sample silhouette values of a clustering, as a Vec with one value in [-1, 1] per row of X: (b - a) / max(a, b), where a is the point's mean Euclidean distance to the other.. | Statistics & ML |
silhouette_score | The mean of silhouette(X, labels), a number in [-1, 1]; the usual single figure for choosing the number of clusters k (largest wins) | Statistics & ML |
simple_cnn | Builds an untrained conv → relu → maxpool → dense image classifier: [height, width] a 2-element vector giving the image size, n_classes a positive integer, and an optional integer.. | Statistics & ML |
simple_rnn_classifier | Builds an untrained GRU-backed sequence classifier: input_size/hidden_size/n_classes positive integers (features per timestep, hidden width, and number of classes), plus an optional.. | Statistics & ML |
simpson | Composite Simpson's rule on sampled data, with the same x/matrix conventions as trapz | Signal processing |
simulate | Draws one random trajectory from a markov_chain chain, starting at its initial_state, for an integer n_steps transitions (with an optional integer seed=) | Statistics & ML |
sin | Standard trigonometric functions, computed elementwise | Core maths |
sinad | With no excitation named, the largest non-DC FFT bin is taken as the fundamental (the single-tone case); tones=/freqs= (a vector, Hz, needs fs=/rate= too) or bins= (a vector of.. | Signal processing |
sinad_estimate | Returns a single number: sinad_estimate in dB, enob_estimate in bits | Signal processing |
sine | Returns a length-n Signal (carries Fs=fs) | Signal processing |
sinh | Hyperbolic sine/cosine/tangent, elementwise | Core maths |
size | The full shape of A as a 2-element Vec, [rows, cols], using the same per-type shape rules as rows/cols above | Core maths |
sizeof | Deprecated — use shape. The same function under a name that means a byte count in every language it could have come from | Collections & strings |
skewness | Third standardized moment, population form, of a length-N numeric vector x | Statistics & ML |
sleep | Pauses the calling thread for that long, first flushing printed output | Concurrency |
smc_init | A first-order sliding-mode controller's initial state | Signal processing |
smith | Impedance on the reflection-coefficient plane: z = Z/z0, Γ = (z−1)/(z+1), drawn on the unit disc ruled by constant-resistance circles and constant-reactance arcs | Plotting |
smooth | One word for the smoothers. x is a length-N number vector; window is a named/positional odd integer, default 5; method is a named string, one of "savgol" (default), "moving",.. | Noise |
smoothmax | Smooth (differentiable) approximation to max(x): (1/beta) * logsumexp(beta * x), which tracks the true maximum more tightly as beta grows (at the cost of a stiffer gradient) | Core maths |
snr | With no excitation named, the largest non-DC FFT bin is taken as the fundamental (the single-tone case); tones=/freqs= (a vector, Hz, needs fs=/rate= too) or bins= (a vector of.. | Signal processing |
sns_bar | Aggregates column valuecol (string, column name) within each distinct value of groupcol (string, column name) of Table df, using aggregator agg (string, positional, default.. | Plotting |
sns_box | One boxplot group per distinct value of column groupcol (string, first-seen order) in Table df, each group's values drawn from column valuecol (string) and labeled with the group's.. | Plotting |
sns_scatter | Seaborn-style scatter pulling columns from Table df: xcol, ycol (strings, column names) give the coordinates; optional huecol (string, column name) draws one series per distinct hue.. | Plotting |
softmax | Elementwise exp(x_i) / sum(exp(x)) — the gradient of logsumexp, and a probability distribution that sums to 1 | Core maths |
softmax_rows | Softmax along each row of an N-row, D-column matrix M of scores, shifted by the row maximum first so a large score cannot overflow the exponential | Statistics & ML |
solve | Solves A·x = b for x by LU with partial pivoting (or, for a CMat/CVec A/b, by complex SVD least squares) | Core maths |
sort | A list of strings sorts lexicographically, a numeric vector sorts numerically | Collections & strings |
sort_by | Returns a Table sorted by that one column | Collections & strings |
sortperm | The 0-based indices that sort x, so x[sortperm(x)] is sorted | Collections & strings |
sosfilt | Returns a same-length vector or Signal (keeping x's own Fs on the way out, when x is a Signal) | Signal processing |
spawn | Runs an already-defined user function on rayon's global thread pool (the Worker abstraction) | Concurrency |
spectral_coherence | Returns a length-nperseg/2 + 1 real vector, the magnitude-squared coherence |Pxy|^2 / (Pxx*Pyy) in [0, 1] — 1 at a frequency where y is an exact linear/time-invariant function.. | Signal processing |
spectral_entropy | Returns a vector of length num_frames (one value per STFT frame), each the Shannon entropy of that frame's normalized power spectrum, scaled to [0, 1]: low when energy concentrates in a.. | Signal processing |
spectrogram | If x is a Signal, its own Fs is used and fs need not be passed; passing one that disagrees with the signal's rate is an error rather than a silent relabelling (see *Which rate is.. | Signal processing |
spectrum | Returns a spectrum of floor(N/2)+1 one-sided bins (DC to Nyquist) | Signal processing |
spectrum_at | Returns the single complex bin nearest that physical frequency (round(freq/df), clamped to the available bins) — addressing the spectrum in Hz instead of by index | Signal processing |
spectrum_normalize | Returns a new spectrum with that convention applied — the same conversion fft/rfft(..., scaling=) do at transform time, usable afterward on a spectrum that already went through.. | Signal processing |
spectrum_unnormalize | Returns a new raw_transform-scaled spectrum — the exact inverse of spectrum_normalize/scaling= | Signal processing |
spiderplot | Radar chart; each argument (a Vec of numbers, one value per spoke/category) becomes its own series, layered onto the current panel's spider chart (repeated calls add more series) | Plotting |
spl | Added in v0.2.4. Sound pressure level of a calibrated Signal: 20*log10(rms/reference) using the calibration's own reference (20 µPa for pressure), AC-coupled | Signal processing |
splineplot | Natural cubic spline through the control points (x[i], y[i]) (equal-length numeric Vecs), resampled onto 200 points for a smooth line | Plotting |
split | s and delim are Strs; optional limit (number of pieces, default: unlimited) stops after that many pieces and leaves the remainder undivided as the last one — split(line, ": ", 2).. | Collections & strings |
sprintf | C/MATLAB-style formatting: fmt is a Str with conversions %d %i %u (integers), %f %e %E %g %G (reals), %s (any value as text), %c, %x %X %o and %%, each with.. | Collections & strings |
sqrt | Elementwise square root. x is a scalar, Vec, or Mat/Signal; a negative element gives NaN (there is no automatic promotion to a complex result) | Core maths |
sqrtm | Principal square root of a dense real square matrix (the root whose eigenvalues have non-negative real part), by the Bjorck-Hammarling recurrence on the complex Schur form:.. | Core maths |
square | A bipolar (±1) periodic pulse train | Plotting |
stackbar | Stacked bar chart: x (Vec, category positions) and y (Mat or list of Vecs, one row/series per stack segment) with the same values=/hatch= options as bar | Plotting |
stair | Step (staircase) plot of equal-length numeric Vecs x, y | Plotting |
stamp | Places a transformed copy of a captured layer (the value capture returned) at position (x, y) (numbers, data units) | Plotting |
standardize | z-score scaling of X (vector, matrix column-wise, or table per numeric column): (x - mean) / std | Statistics & ML |
start | Begins counting, or resumes from pause | REPL & diagnostics |
start_time | Added in v0.2.4. The time of sample 0, in seconds (0 unless set_start_time was called, so nothing about an un-dated signal changes) | Signal processing |
starts_with | Returns a bool: true if s starts with prefix | Collections & strings |
stationary | Computes the long-run state distribution of a markov_chain chain by power iteration; converges for any irreducible, aperiodic chain | Statistics & ML |
std | Sample standard deviation (N-1, unbiased, denominator) of every element of x — a scalar, Vec, or Mat/Signal | Core maths |
ste | Returns a vector of length num_frames, one energy value per frame | Signal processing |
steer_delays | The geometry half of beamform on its own: the per-element steering delays tau_m = x_m*sin(theta)/c, in seconds, for element coordinates positions and a direction angle_degrees.. | Signal processing |
stem | Discrete stem plot: x, y are equal-length Vecs of numbers; draws a vertical line plus a dot from the baseline up to each (x[i], y[i]) (marker "stem") | Plotting |
step | Applies one action (an integer 0-3) from the current integer state index in environment env | Statistics & ML |
step_info | Returns a record {final, rise_time (10-90 %), settling_time (2 %), overshoot_pct, peak, peak_time, tau (first time at 63.2 % of final), delay_time (50 %)} | Signal processing |
stepz | Same arguments and length rule as impz | Signal processing |
stft | Returns an nfft×num_frames complex matrix (CMat, the full per-frame spectrum, not one-sided) — one column per frame, built from a periodic-Hann-windowed FFT per frame | Signal processing |
stop | Freezes the timer and resets the count to zero (unlike pause, which keeps it); returns none | REPL & diagnostics |
stop_grad | Returns the plain, untracked inner value (same numeric content and shape) detached from the tape, so gradients don't flow through it — e.g. holding a target/label steady, or truncating.. | REPL & diagnostics |
str | Renders x (any value/type) the same way print/disp would | Collections & strings |
stratified_split | The same shape as train_test_split on X/y/test_size/seed=, but splits each class of y separately before combining, so a rare class keeps its proportion in both sets every time.. | Statistics & ML |
subplot | Selects cell k (integer, 1-based, row-major) of a rows-by-cols (integers) grid as the target for further drawing | Plotting |
substr | Plain aliases of the same implementation (mid exists purely for BASIC/Excel discoverability) | Collections & strings |
subtract | The operators as named functions, so an operation can be passed where a name is what you can pass | Core maths |
sum | Sum of every element of x — a scalar, Vec, or Mat/Signal (real; additionally accepts a CVec/CMat and returns a Complex in that case) | Core maths |
summary | The parameter table of a least-squares fit (curve_fit, least_squares, circuit_fit/sysid): one row per parameter with estimate, stderr, t, P> | Signal processing |
svd | Thin SVD of A (r×c Mat or CMat), A = U·diag(s)·Vᵀ | Core maths |
svdvals | The singular values of A (any real r×c matrix) as a Vec, descending, of length min(r,c): svdvals(diag([3, 2, 1])) is [3, 2, 1] | Core maths |
svm_model | Binary-classification support-vector machine by simplified SMO on an N-row, D-column X and a length-N target y that must take exactly two distinct values (no one-vs-rest wrapper) | Statistics & ML |
svr_model | Support-vector regression on an N-row, D-column X and a length-N numeric target y | Statistics & ML |
swap | swap atomically exchanges front and back (returns Nothing); read returns the stable front value | Collections & strings |
swap_endian | Reverses the byte order within each width-byte chunk (big-endian u32s become little-endian and back), unlike reverse_bytes, which reverses the whole buffer | Collections & strings |
sweep | Generates a linear (or, with method="logarithmic", log) frequency sweep from f0 to f1 (numbers, Hz) sampled at rate fs (number, Hz) for n (integer) samples | Plotting |
sylvester | Solves the Sylvester equation A X + X B = C for X, with A n×n, B m×m and C n×m (real matrices; X is n×m) | Core maths |
sysid | Model selection: fits a ladder of standard topologies and picks one by an information criterion | Signal processing |
sysinfo | Returns a Record describing this machine: .os/.arch/.hostname/.cpu/.qu_version/.build (strings), .logical_cores (integer), .physical_cores and .total_memory (number, or.. | Concurrency |
T
table | Each named argument is a column: values is either a numeric Vec / List of Str (a real column) or a scalar number/Str (broadcast to every row) | Collections & strings |
tail | Returns the first (head) or last (tail) n elements/rows, same type as s | Collections & strings |
take | Returns the same type as xs: the first n elements (take) or everything after them (drop) | Collections & strings |
tan | Standard trigonometric functions, computed elementwise | Core maths |
tanh | Hyperbolic sine/cosine/tangent, elementwise | Core maths |
tape_reset | Discards every entry recorded so far on the autodiff tape, freeing the memory a chain of param/grad calls has built up | Statistics & ML |
tcdf | Student t cumulative distribution at t with nu (positive, need not be an integer) degrees of freedom | Statistics & ML |
tcp_accept | Returns a TcpListener handle from tcp_listen, and a TcpConn handle from tcp_accept | Concurrency |
tcp_close | sock must be a TcpConn handle (from tcp_accept/tcp_connect) — not a TcpListener; calling it on a listener errors, since a listener has no explicit close and simply releases its OS.. | Concurrency |
tcp_connect | tcp_connect(host, port): host (string, hostname or IP) and port (integer 0-65535) — blocks until connected (or the OS gives up and errors), returning a TcpConn handle, the.. | Concurrency |
tcp_listen | Returns a TcpListener handle from tcp_listen, and a TcpConn handle from tcp_accept | Concurrency |
tcp_port | tcp_connect(host, port): host (string, hostname or IP) and port (integer 0-65535) — blocks until connected (or the OS gives up and errors), returning a TcpConn handle, the.. | Concurrency |
tcp_recv | Neither call frames the message for you — TCP is a stream, so a length prefix or delimiter is yours to add if you need distinct messages | Concurrency |
tcp_send | Neither call frames the message for you — TCP is a stream, so a length prefix or delimiter is yours to add if you need distinct messages | Concurrency |
tell | Reports f's (file handle, opened readable) current read position | File I/O |
tex | Not figure export — converts a single Qu value x (number, Vec, Mat, or complex) to a LaTeX math-mode string (e.g. a matrix becomes a bmatrix environment) and returns it as a string | Plotting |
text | Plain text label text (string) placed at (x, y) (numbers, data units), no marker dot -- by default just up and to the right of the point | Plotting |
tf | Returns a record {b, a}: the transfer-function coefficients in ascending powers of z^-1, with a[0] = 1 (an FIR filter's a is [1]) | Signal processing |
thd | Returns a single number, dB below the fundamental | Signal processing |
thd_n | Returns a single number, dB below the fundamental: harmonics *and* noise together against the signal (-sinad_db, the same noise_power sinad already totals over every non-excitation.. | Signal processing |
theme | Sets the whole-figure visual theme from name (string): one of "default", "publication", "bw", "minimal", "grey", "classic" | Plotting |
threshold | Elementwise binary threshold, general-purpose (not image-specific) | Images |
tic | Starts (or restarts) the single global stopwatch | REPL & diagnostics |
timestamps | Added in v0.2.4. The absolute time axis as a vector, start_time + i/Fs for each sample | Signal processing |
tinv | Inverse of tcdf -- the t critical value: tinv(0.975, 10) is 2.228 | Statistics & ML |
title | Sets the current panel's title to text (string) | Plotting |
tkeo | Returns a length-(N-2) vector (like diff, doesn't pad — the definition needs a neighbor on each side) | Signal processing |
tmp_file | Creates a new empty file under the OS temp directory with a name nothing else will collide with (process id, nanosecond clock, and a counter — any one alone has a plausible collision window) | File I/O |
to_bool | For a Str, x is parsed, not weighed: "true"/"false" (any case) and any number spelling work, and anything else errors — because a config file holding "false" means false, and.. | Collections & strings |
to_cmyk | Takes apart any colour the language accepts (color, a string) into that space's own coordinates, returned as a Vec of numbers — to_rgb gives (r,g,b), to_hsl gives (h,s,l),.. | Plotting |
to_digital | Returns a Digital value (a Model, kind "digital") remembering x and threshold together, so edges/rising_edges/falling_edges/high_time/low_time/duty_cycle below can be.. | Signal processing |
to_float | The parsing half of to_int without the rounding — mostly for turning text read from a file or an instrument into a number | Collections & strings |
to_hsl | Takes apart any colour the language accepts (color, a string) into that space's own coordinates, returned as a Vec of numbers — to_rgb gives (r,g,b), to_hsl gives (h,s,l),.. | Plotting |
to_hsv | Takes color (any string/value the language accepts as a colour — name, hex, rgb(...), etc.) and returns its (h, s, v) triple as a Vec of numbers | Plotting |
to_int | Rounds to the nearest whole number, ties away from zero — the same primitive round uses, so the two agree by construction rather than by coincidence | Collections & strings |
to_lab | Takes apart any colour the language accepts (color, a string) into that space's own coordinates, returned as a Vec of numbers — to_rgb gives (r,g,b), to_hsl gives (h,s,l),.. | Plotting |
to_rgb | Takes apart any colour the language accepts (color, a string) into that space's own coordinates, returned as a Vec of numbers — to_rgb gives (r,g,b), to_hsl gives (h,s,l),.. | Plotting |
to_unit | Added in v0.2.4. Alias of convert_unit(s, unit) above — the spec's own second spelling, kept so a reader following toolkit-signal.md §10 literally finds it | Signal processing |
to_vec | Returns a List: the linked list's elements, front to back | Collections & strings |
toc | Returns a number: elapsed seconds (float, fractional) since the last tic() | REPL & diagnostics |
toeplitz | Toeplitz matrix with first column c and first row r (real Vecs), a length(c)×length(r) Mat with constant diagonals; without r it is the symmetric Toeplitz matrix of c | Core maths |
tolower | Returns a Str: C's names for upper/lower, accepted so a ported line does not have to be edited | Collections & strings |
touch | Unix touch semantics. path (string) is the filesystem path: creates an empty file if it doesn't exist; if it already exists, updates its modification time WITHOUT altering its content | File I/O |
toupper | Returns a Str: C's names for upper/lower, accepted so a ported line does not have to be edited | Collections & strings |
tpdf | Student t probability density at t with nu degrees of freedom | Statistics & ML |
trace | The sum of the diagonal of M, a square (or rectangular — only min(rows,cols) diagonal entries are summed) Mat | Core maths |
trace_diff | Compares two traces sample by sample and returns a record instead of raising, so a test can assert on it and a report can print it | Signal processing |
trace_load | Reads a .csv or .npz trace and returns a record with one Vec per signal, in the order they were saved, whichever format it came from | Signal processing |
trace_save | Writes a trace (a record of real vectors or a table of numeric columns, all the same length) to path | Signal processing |
track | Wraps a plain number, vector, or matrix v as a fresh, differentiable Tensor — a new leaf node on the autodiff tape with no inputs of its own, so grad treats it as something to.. | Statistics & ML |
train_loop | Runs the fit loop inside the engine rather than stepping it from Qu: loss_fn_name a string naming an in-scope function (params) -> number, params the Tensor (from param(...)) or.. | Statistics & ML |
train_test_split | Splits an N-row feature matrix X and a length-N target vector y into training and test sets, X and y permuted together by the same random order (unless shuffle=false) | Statistics & ML |
train_val_test_split | Three-way split of X/y into training, validation, and test sets: val_size/test_size are numbers in (0, 1) (both default 0.2); val_size is rescaled against the remainder left.. | Statistics & ML |
transfer_function | Returns an frf model carrying the frequency response of the system taking input to output, with fields h (length-nperseg/2 + 1 CVec), freq (the matching Hz axis), coherence,.. | Signal processing |
transform | Applies a fitted scaler Record scaler's stored parameters to a new matrix/vector/table newX with the same columns it was fitted on | Statistics & ML |
transformer_block | One transformer block on an (N, D) input x: multi-head self-attention plus a two-layer feed-forward network, each wrapped in a residual connection and a layer_norm | Statistics & ML |
transpose | Matrix/vector transpose: swaps rows and columns | Core maths |
trapz | Trapezoid-rule integral of the samples y against x (unit spacing when x is omitted), summed with compensated (Neumaier) summation | Signal processing |
tree_model | One CART decision tree on an N-row, D-column matrix X and a length-N target y, with max_depth (integer, default 20) limiting tree depth, min_samples_split (integer, default 2).. | Statistics & ML |
triangle | Each generates one period-repeating waveform: freq (number, Hz), fs (number, sample rate in Hz), n (integer, sample count) are all scalars, in that order | Plotting |
tril | Lower/upper triangle of A, other entries set to 0 | Core maths |
trim | Strips characters from both ends of a string | Collections & strings |
triu | Lower/upper triangle of A, other entries set to 0 | Core maths |
trnd | Random draws from the Student t distribution | Statistics & ML |
tsne | t-SNE embedding of an N-row, D-column matrix X into n_components dimensions (an integer, default 2), controlled by perplexity (a number balancing local vs. global structure; unset.. | Statistics & ML |
tstat | Mean and variance of the Student t distribution with these parameters, as a result with fields .mean and .var | Statistics & ML |
tv_denoise | Total-variation denoising: y is a length-N number vector; lambda is an optional positional number, the smoothing penalty, default 1.0 — larger values remove more variation | Noise |
type | Returns a Str: the value's type, e.g. "number", "string", "vector", "matrix", "table", "layer" | Collections & strings |
U
ucase | BASIC's names for upper/lower; toupper/tolower are C's names for the same thing | Collections & strings |
ui_button | Declares a push-button, labeled label (string); id= (string) as above | Plotting |
ui_checkbox | Declares an on/off toggle, labeled label (string) | Plotting |
ui_number | Declares a free-entry number box (for a value you type exactly rather than sweep), labeled label (string) | Plotting |
ui_select | Declares a dropdown, labeled label (string), choosing among options (a List of strings — or of any values, displayed via their string form) | Plotting |
ui_slider | Declares a slider control (for a value you sweep) in an explore page or Qu Studio, labeled label (string) with range min..max (numbers) | Plotting |
ui_text | Declares a free-text field, labeled label (string) | Plotting |
undershoot | Returns a single number, a percent of the step's own size abs(final - initial): overshoot is how far the response travels *past its settled value* in the direction the step was going,.. | Signal processing |
unidcdf | Cumulative discrete uniform distribution P(X <= k), a step function of floor(k) | Statistics & ML |
unidinv | Inverse of unidcdf: the smallest support point whose CDF reaches p (so unidinv(unidcdf(k, ...), ...) is k), for p in [0, 1] (outside is an error) | Statistics & ML |
unidpdf | Probability mass of the discrete uniform distribution at k (a number, vector or matrix, elementwise); zero at a non-integer or out-of-support k | Statistics & ML |
unidrnd | Random draws from the discrete uniform distribution | Statistics & ML |
unidstat | Mean and variance of the discrete uniform distribution with these parameters, as a result with fields .mean and .var | Statistics & ML |
unifcdf | Cumulative continuous uniform distribution P(X <= x) | Statistics & ML |
unifinv | Inverse of unifcdf: the x with unifcdf(x) = p, for p in [0, 1] (outside is an error) | Statistics & ML |
unifit | Maximum-likelihood fit: a result with the named parameters a, b, plus .params (the same as a vector), .n and .loglik (the log-likelihood at the estimate) | Statistics & ML |
uniform | Draws from the uniform distribution on [a, b), two numbers a < b, with the same rows/cols/seed= shape as rand | Statistics & ML |
unifpdf | Probability density of the continuous uniform distribution at x (a number, vector or matrix, elementwise) | Statistics & ML |
unifrnd | Random draws from the continuous uniform distribution | Statistics & ML |
unifstat | Mean and variance of the continuous uniform distribution with these parameters, as a result with fields .mean and .var | Statistics & ML |
unique | Returns a Vec: a sorted, de-duplicated copy | Collections & strings |
unit_scale | Returns the scale factor a unit name = ... declaration registered, or errors naming name if nothing was ever declared under it | REPL & diagnostics |
unpack | The inverse of pack: bytes is a byte buffer, spec the same field list | Collections & strings |
update | Estimation-family only: the measurement-update half of a filter, called on a state Record state with filter-specific arguments (an observation matrix/function, a measurement vector, and a.. | Statistics & ML |
upper | Unicode-aware uppercase conversion | Collections & strings |
upsample | Raises the sample rate by an integer factor: inserts L-1 zeros between samples, then interpolates with a lowpass at the original Nyquist (fs/2), scaled by L to preserve amplitude | Signal processing |
V
val | Materializes a value; currently the identity on any x (:= is already eager pre-M4) but will force evaluation of a deferred binding once M4 lazy fusion lands | Core maths |
value_and_grad | Takes a function f and a point x, and returns a two-element list [f(x), grad_f(x)] from a single forward pass, with the gradient shaped like x | REPL & diagnostics |
values | Returns a List: its keys (keys), its values (values), or (key, value) tuples (items) — insertion order, not sorted | Collections & strings |
vander | Vandermonde matrix: row i is [v[i]^(n-1), ..., v[i], 1], a length(v)×n Mat (n defaults to length(v); 0^0 is 1) | Core maths |
vanicek | Returns a length-M real vector, the power spectrum at each requested frequency — Vanicek's Least-Squares Spectral Analysis, valid for unevenly-sampled (t, x) where fft/dft/goertzel.. | Signal processing |
var | Sample variance, same N-1 (unbiased) denominator as std, so var(x) == std(x)^2 always holds | Core maths |
verify_signal | Structural sanity before any of the semantic diagnostics above is worth running — deliberately narrow: it answers "are these samples a usable record", not "is this signal any good" | Signal processing |
violin | The same Gaussian KDE and Tukey summary as raincloud, arranged the other way: the density is MIRRORED about the category into the closed symmetric shape, with the box inside it and the.. | Plotting |
viterbi | Runs the Viterbi algorithm on an hmm model hmm for a length-T integer observation sequence obs (same encoding as forward) | Statistics & ML |
vline | Draws a vertical reference line spanning the whole panel at x (number, data units) | Plotting |
vmap | Applies f across the leading batch axis of xs — rows of a matrix, elements of a vector, items of a list — and stacks the results: a vector when every result is a scalar, a matrix (one.. | REPL & diagnostics |
vmd | Variational Mode Decomposition: decomposes x into exactly k band-limited modes by minimizing each mode's bandwidth around its own center frequency, solved by ADMM (not sifting, unlike.. | Signal processing |
voronoi | Computes the Voronoi diagram of an (N, 2) point matrix points, built on a real Delaunay triangulation | Statistics & ML |
vstack | Named equivalents of bracket-literal block concatenation ([a, b] horizontally / [a; b] vertically) | Core maths |
vswr | Returns (1 + |Γ|)/(1 - |Γ|) | Signal processing |
W
warburg | Aw (1-j)/sqrt(w) — semi-infinite diffusion, a constant −45° phase at every frequency | Signal processing |
warburg_open | Rw coth(x)/x, x = sqrt(jw tau) — finite length, reflecting boundary | Signal processing |
warburg_short | Rw tanh(x)/x, x = sqrt(jw tau) — finite length, transmissive boundary | Signal processing |
warn | Non-fatal — execution continues on the next line, unlike error | REPL & diagnostics |
waterfall | A 2-D approximation of the stacked-trace look — no true 3-D projection yet | Plotting |
wblcdf | Cumulative Weibull distribution P(X <= x) | Statistics & ML |
wblfit | Maximum-likelihood fit: a result with the named parameters a, b, plus .params (the same as a vector), .n and .loglik (the log-likelihood at the estimate) | Statistics & ML |
wblinv | Inverse of wblcdf: the x with wblcdf(x) = p, for p in [0, 1] (outside is an error) | Statistics & ML |
wblpdf | Probability density of the Weibull distribution at x (a number, vector or matrix, elementwise) | Statistics & ML |
wblrnd | Random draws from the Weibull distribution | Statistics & ML |
wblstat | Mean and variance of the Weibull distribution with these parameters, as a result with fields .mean and .var | Statistics & ML |
welch | Returns a spectrum of nperseg/2 + 1 one-sided bins (DC to Nyquist), stamped norm = "density" — SciPy's "density" scaling, units²/Hz | Signal processing |
where | One argument mask (a Vec/Mat of booleans, typically produced by a comparison like x < 0) returns a Vec of the 0-based indices where it is true. Three arguments — cond (a boolean.. | Core maths |
wigner_ville | Wigner-Ville distribution: the quadratic time-frequency distribution W(t,f) = ∫ x(t+τ/2)*conj(x(t-τ/2))*exp(-2πifτ) dτ, discretized over the analytic signal | Signal processing |
window | Returns the named window as a length-n real vector | Signal processing |
worker_done | Non-blocking check of whether worker w (a Worker handle from spawn) has finished | Concurrency |
wrap | Returns the same shape as x, each value reduced modulo hi - lo into that range — the standard fix for angle/phase data that has accumulated past a full turn (atan2 output, an.. | Signal processing |
write | Dispatches on the type of the first argument | REPL & diagnostics |
write_array | Writes a whole Vec/Mat/Signal (or a bare number/bool) to a binary file in one call, without an explicit fopen — the write-side counterpart read_array never had | File I/O |
write_bin | The inverse of read_bin: writes raw bytes to f (file handle, opened writable/appendable) | File I/O |
write_bit | Writes one bit to f (file handle, opened writable/appendable) | File I/O |
write_byte | Writes one raw byte to f (file handle, opened writable/appendable) | File I/O |
write_char | Writes s (string) to f (file handle, opened writable/appendable) with no newline added | File I/O |
write_csv | Writes a Table to a CSV file | File I/O |
write_double | Writes n (number) to f (file handle, opened writable/appendable) as a 64-bit IEEE-754 float | File I/O |
write_float | Writes n (number) to f (file handle, opened writable/appendable) as a 32-bit IEEE-754 float | File I/O |
write_int | The mirror of read_int, writing value (a number) to f (file handle, opened writable/appendable) in the given width and byte order | File I/O |
write_int16 | Writes n (number) to f (file handle, opened writable/appendable) as a signed 16-bit integer | File I/O |
write_int32 | Writes n (number) to f (file handle, opened writable/appendable) as a signed 32-bit integer | File I/O |
write_int64 | Writes n (number) to f (file handle, opened writable/appendable) as a signed 64-bit integer | File I/O |
write_line | Writes s (string) to f (file handle, opened writable/appendable) plus a trailing \n | File I/O |
write_npy | Writes a number, bool, vector, matrix or complex form of those as a version-1 .npy file NumPy can load: float64, bool or complex128, C order, bit-exact (NaN, infinities and -0.0.. | File I/O |
write_npz | Writes the fields of a record as an uncompressed .npz (what numpy.savez makes); each field is stored as write_npy would store it | File I/O |
write_report | Writes a standalone HTML report to path (string) — every figure, table, and printed line the script has produced up to this point in execution, bundled into one file with nothing linked.. | File I/O |
write_text | Writes the whole string to a file, overwriting it | Collections & strings |
write_uint16 | Writes n (number) to f (file handle, opened writable/appendable) as an unsigned 16-bit integer | File I/O |
write_uint32 | Writes n (number) to f (file handle, opened writable/appendable) as an unsigned 32-bit integer | File I/O |
write_uint64 | Writes n (number) to f (file handle, opened writable/appendable) as an unsigned 64-bit integer | File I/O |
writeline | Writes its arguments, space-separated, and a newline, to stdout | Collections & strings |
X
xbreak | Reshapes the *main* x-axis's coordinate mapping with a fixed-width "//" jag that squeezes out the skipped range [lo, hi] (numbers, data units) — linear-scale axes only | Plotting |
xcorr | Returns a length-N+M-1 vector, the full lag range (zero lag at the middle for equal-length inputs) | Signal processing |
xlabel | Labels the current panel's x-axis with text (string) | Plotting |
xlim | Fixes an axis range from lo, hi (numbers, data units) | Plotting |
xml2csv | str (string, XML text) is converted to CSV text: exactly csvify(parse_xml(str)). Returns a string | File I/O |
xml2json | Like csv2json, this produces the same plain array-of-row-objects shape, not jsonify(parse_xml(str))'s type-tagged envelope | File I/O |
xmlify | Converts any value (any Value) to an XML string — see "The Value<->XML mapping" below | File I/O |
xor | Returns a bool: logical XOR, non-short-circuit like and/or | Collections & strings |
xscale | Sets that axis's scale from a string, "linear" or "log" | Plotting |
xspan | Draws a translucent vertical band covering x in [x0, x1] (numbers, data units) across the panel's full height | Plotting |
xticklabels | Sets categorical x tick labels from the given strings (variadic positional arguments); without an xticks(...) call, spread evenly across the current x-extent | Plotting |
xticks | Sets explicit x tick positions from positions (Vec of numbers, data units), paired in order with xticklabels(...) when both are set | Plotting |
Y
ybreak | Same as xbreak, on the y-axis: squeezes out [lo, hi] (numbers, data units) | Plotting |
ylabel | Labels the current panel's y-axis with text (string) | Plotting |
ylim | Fixes an axis range from lo, hi (numbers, data units) | Plotting |
yscale | Sets that axis's scale from a string, "linear" or "log" | Plotting |
yspan | Draws a translucent horizontal band covering y in [y0, y1] (numbers, data units) across the panel's full width | Plotting |
yticklabels | yticks takes a Vec of numbers (tick positions, data units); yticklabels takes variadic strings to relabel them in order | Plotting |
yticks | yticks takes a Vec of numbers (tick positions, data units); yticklabels takes variadic strings to relabel them in order | Plotting |
Z
zeros | A vector or matrix of zeros. One numeric argument n gives a length-n Vec; two arguments r, c give an r×c Mat — even a degenerate two-argument shape like zeros(n, 1) stays a.. | Core maths |
zeros_like | A vector or matrix of the same shape as x (a Vec or Mat), filled with one or zero respectively — the shape is read directly from x, so it cannot fall out of step with it | Core maths |
zeta | The Riemann zeta function for real s, elementwise (number, Vec or Mat): zeta(2) = pi²/6, zeta(4) = pi⁴/90, zeta(0) = -1/2, zeta(-1) = -1/12, the trivial zeros zeta(-2k) = 0,.. | Core maths |
zip | Returns a List of tuples, pairing up the collections element by element, stopping at the shortest | Collections & strings |
zlib_decompress | Inflates a zlib stream (RFC 1950 wrapper around RFC 1951 DEFLATE): data is a Str or a Vec of 0-255 byte values; as_str (named boolean, default false) asks for text instead of bytes | File I/O |
zoom_inset | Magnifies the data region x in [x0, x1], y in [y0, y1] (numbers, data units) into an auto-placed inset panel, with a dashed zoom-box drawn over the source region and connector lines.. | Plotting |
zpk | Returns a record {z, p, k}: zeros and poles as complex vectors and the gain, for H(z) = k * prod(z - z_i) / prod(z - p_i) | Signal processing |
Native modules
Not builtins, and deliberately not in the count above: these come from modules compiled into the engine, and a program reaches them with import, which opens the bare name and leaves the qualified one available too.
codec.decode_flac | Decodes a FLAC file to samples | File I/O |
codec.decode_mp3 | Decodes an MP3 file. Same arguments and same two return forms as codec.decode_flac | File I/O |
codec.decode_wav | Decodes a WAV file. Same arguments and same two return forms as codec.decode_flac | File I/O |
codec.encode_wav | The same encoder as codec.write_wav, returning the file's bytes as a Vec of whole numbers 0-255 instead of writing them — the exact inverse of what codec.decode_wav accepts, so a.. | File I/O |
codec.flac_info | Reads a FLAC file's header without decoding any audio, which is how to check a file is what you expect before paying for the samples | File I/O |
codec.write_wav | Writes audio out as a WAV file | File I/O |
xlsx.add_chart | Adds a native Excel chart that refers to the cells, so it follows later edits in Excel/LibreOffice | File I/O |
xlsx.add_comment | Attaches a note to a cell (the red corner; the text shows on hover) | File I/O |
xlsx.add_image | Places a PNG, JPEG or GIF with its top-left corner at cell at (default: two columns right of the used range, row 2, like add_chart) | File I/O |
xlsx.add_nyquist_chart | A Nyquist plot for impedance spectroscopy: Z' (range re) along x, -Z'' up, the axes on the SAME scale with square gridlines, so a semicircle stays round | File I/O |
xlsx.add_sheet | Adds an empty sheet. xlsx.rename_sheet(wb, sheet, new) and xlsx.delete_sheet(wb, sheet) rename and remove (the last sheet cannot be removed) | File I/O |
xlsx.add_validation | Restricts what can be typed into range | File I/O |
xlsx.autofilter | Puts filter buttons on the header row of range (header row plus the data below it) | File I/O |
xlsx.clear | Empties a range: what="contents" removes values and formulas and keeps the formatting, "formats" removes the formatting and keeps the values, "all" both | File I/O |
xlsx.color_scale | Colours every cell of range on a scale from its lowest value (low) to its highest (high); with mid= a three-colour scale centred on the 50th percentile | File I/O |
xlsx.column_width | Column width in Excel's character units (0-255); xlsx.row_height(wb, sheet, row, points) sets a row's height | File I/O |
xlsx.conditional_format | Highlights the cells of range that satisfy rule: "greater_than", "less_than", "greater_equal", "less_equal", "equal", "not_equal", "between"/"not_between" (two values,.. | File I/O |
xlsx.copy_sheet | Copies a sheet to a new one named new_name, appended after the last sheet: cells, formulas, formatting, merges, column widths, freeze panes, conditional formats, validations, and the.. | File I/O |
xlsx.create_table | Turns range into an Excel Table named name (letters, digits, _ and ., starting with a letter or _, not a cell address like A1; unique in the workbook): banded rows, filter.. | File I/O |
xlsx.define_name | A workbook-level defined name, e.g. xlsx.define_name(wb, "Frequency", "Data!$A$2:$A$100") | File I/O |
xlsx.delete_columns | not described in a chapter yet | |
xlsx.delete_rows | not described in a chapter yet | |
xlsx.delete_sheet | not described in a chapter yet | |
xlsx.discard | Releases the handle early; handles otherwise live until the run ends | File I/O |
xlsx.fill_formula | Stores formula in every cell of range, shifting its relative references from the range's first cell the way Excel's fill-down does ($-anchored parts, string literals and quoted sheet.. | File I/O |
xlsx.format_cells | Formats every cell of range: colours as #rrggbb, number_format in Excel's own codes (0.00, 0.00E+00, yyyy-mm-dd), align left/center/right | File I/O |
xlsx.formula | The formula in a cell without its leading =, or none | File I/O |
xlsx.freeze_panes | Freezes the rows above and the columns left of cell: "A2" keeps the header row in view, "B2" the header row and first column | File I/O |
xlsx.get_cell | The value of one cell, cell as Excel shows it ("B3"); sheet is a name or a 0-based index | File I/O |
xlsx.get_range | A rectangular range ("A1:C20") as a list of rows of cell values; with numeric=true, a matrix with NaN for anything that is not a number | File I/O |
xlsx.hide_sheet | Hides a sheet: state="hidden" (Excel's Hide; the user can Unhide it), "very_hidden" (not in Excel's Unhide list -- only reachable from the VBA editor or by calling this again) or.. | File I/O |
xlsx.insert_columns | not described in a chapter yet | |
xlsx.insert_rows | Inserts n rows before 1-based row, shifting references | File I/O |
xlsx.merge | Merges a range into one cell | File I/O |
xlsx.move_range | Moves range so its top-left corner lands on cell to (on to_sheet, default the same sheet), taking values, formulas and formatting and overwriting what was there; blanks in the source.. | File I/O |
xlsx.new | A new workbook with one empty sheet, Sheet1 | File I/O |
xlsx.open | Opens an existing workbook for editing in place and returns a handle (a small Model); every xlsx.* edit below changes the workbook behind it until xlsx.save_as | File I/O |
xlsx.read | Reads one worksheet of a workbook into a Table, the same type read_csv produces, so everything that consumes a CSV consumes a spreadsheet unchanged | File I/O |
xlsx.rename_sheet | not described in a chapter yet | |
xlsx.row_height | not described in a chapter yet | |
xlsx.save_as | Writes the workbook to path (overwriting) | File I/O |
xlsx.set_cell | Sets one cell to a number, string, boolean, or none (empty) | File I/O |
xlsx.set_formula | Stores a formula (the = is optional) | File I/O |
xlsx.set_range | Writes a Table (its column names first, unless header=false), a matrix, a vector (one column) or a list of rows, with its top-left corner at anchor | File I/O |
xlsx.sheets | Names a workbook's worksheets without reading any of them, so a program can find out what it is holding before deciding what to load | File I/O |
xlsx.sort_range | Sorts the rows of range by one or more key columns: by="C" is a column of the sheet, by=2 the second column of the range, a list (by=["B", "A"]) breaks ties by the next key, and.. | File I/O |
xlsx.to_pdf | Converts the workbook to PDF through LibreOffice (see docx.to_pdf) | File I/O |
xlsx.used_range | The smallest range covering every non-empty cell, e.g. "A1:D20", or none for an empty sheet | File I/O |
xlsx.write | Writes a Table out as a one-worksheet workbook | File I/O |
pptx.new | A new, empty 16:9 presentation with four layouts: Title Slide, Title and Content, Title Only, Blank | File I/O |
pptx.open | Opens a presentation for reading and editing and returns a handle -- surgical editing, as docx.open | File I/O |
pptx.save_as | Writes the presentation. Refused under --sandbox | File I/O |
pptx.discard | not described in a chapter yet | |
pptx.info | Document properties plus slides, width_mm, height_mm and layouts | File I/O |
pptx.set_info | not described in a chapter yet | |
pptx.slide_count | The number of slides. pptx.slides(p) returns every slide's text; pptx.slide_text(p, i) one slide's (a line per paragraph, tables included); pptx.slide_title(p, i) its title.. | File I/O |
pptx.slides | not described in a chapter yet | |
pptx.slide_text | not described in a chapter yet | |
pptx.slide_title | not described in a chapter yet | |
pptx.notes | not described in a chapter yet | |
pptx.find_text | Indices of the slides containing text | File I/O |
pptx.replace_text | Replaces across every slide (and the speaker notes unless notes=false), across formatting runs, keeping each match's formatting | File I/O |
pptx.layouts | The layout names add_slide can use | File I/O |
pptx.add_slide | Adds a slide from a layout (by name, case-insensitive, or index; default Title and Content), filling its title placeholder and its body placeholder (body a string, one bullet per line, or.. | File I/O |
pptx.delete_slide | Deletes a slide with its notes, and removes it from any section | File I/O |
pptx.move_slide | not described in a chapter yet | |
pptx.duplicate_slide | not described in a chapter yet | |
pptx.hide_slide | not described in a chapter yet | |
pptx.unhide_slide | not described in a chapter yet | |
pptx.add_text | Adds a text box to slide i. Positions are millimetres from the top-left corner or lengths (20 mm); size in points | File I/O |
pptx.add_image | Adds a PNG/JPEG/GIF; give one of w/h and the other follows the aspect ratio, neither and it is centred at 96 dpi | File I/O |
pptx.add_table | Adds a table (from a Table, matrix or list of rows) in PowerPoint's built-in Medium Style 2 | File I/O |
pptx.to_markdown | One ## Slide N: title section per slide, the other text as bullets and the notes as a quote | File I/O |
pptx.to_pdf | Converts to PDF through LibreOffice, as docx.to_pdf | File I/O |
pptx.set_notes | Sets slide i's speaker notes (newlines start paragraphs) | File I/O |
pptx.shapes | The slide's top-level shapes, back to front, as records with id, name, kind (text, placeholder, shape, picture, table, chart, graphic, group, connector),.. | File I/O |
pptx.set_shape_text | Replaces a text box's, placeholder's or shape's text, one paragraph per line, keeping the first run's formatting | File I/O |
pptx.delete_shape | Deletes a shape; a relationship only it used goes too, and an image no other part uses is removed from the package | File I/O |
pptx.move_shape | Moves a shape (mm or lengths); pptx.resize_shape(p, i, shape, [w=], [h=]) resizes it | File I/O |
pptx.resize_shape | not described in a chapter yet | |
pptx.set_slide_title | Sets the slide's title placeholder text, adding the title placeholder from the slide's layout if the slide has none | File I/O |
pptx.bring_to_front | Draws the shape on top of the others; pptx.send_to_back(p, i, shape) behind them | File I/O |
pptx.send_to_back | not described in a chapter yet | |
pptx.set_link | Makes every occurrence of text in the shape a hyperlink to url (splitting a run where the match is only part of it; the pieces keep its formatting), or without text= all of the.. | File I/O |
pptx.links | not described in a chapter yet | |
pptx.theme_colors | The theme's colour scheme as a record of #RRGGBB strings: dk1, lt1, dk2, lt2, accent1...accent6, hlink, folHlink | File I/O |
pptx.theme_fonts | not described in a chapter yet | |
pptx.set_theme_colors | Sets colour-scheme slots ("#RRGGBB"); pptx.set_theme_fonts(p, [major=], [minor=]) sets the heading/body typefaces | File I/O |
pptx.set_theme_fonts | not described in a chapter yet | |
pptx.add_chart | Adds a native, scalable PowerPoint chart to slide i from numbers given directly (a vector or a table column such as data.z); returns the new shape's id | File I/O |
pptx.add_nyquist_chart | A Nyquist plot for impedance spectroscopy on slide i: Z' along x, -Z'' up, both axes on the SAME scale with square gridlines, so a semicircle stays round | File I/O |
pptx.add_shape | Adds a shape to slide i and returns its id | File I/O |
pptx.align_shapes | Lines shapes (a list of ids and/or names) up: how is "left", "right", "top", "bottom", "center" (horizontally) or "middle" (vertically) | File I/O |
pptx.rotate_shape | Sets the shape's rotation to degrees clockwise (0 or 360 clears it; a negative angle turns it the other way) | File I/O |
docx.new | A new, empty A4 document with Normal, Title and Heading 1-3 styles | File I/O |
docx.open | Opens a Word document for reading and editing and returns a handle | File I/O |
docx.save_as | Writes the document (overwriting) | File I/O |
docx.discard | not described in a chapter yet | |
docx.full_text | Every paragraph's text in document order -- body, tables, text boxes -- one per line, tabs and line breaks included | File I/O |
docx.paragraphs | The body-level paragraphs as a List of Str | File I/O |
docx.headings | A List of {level, text} records for heading-styled paragraphs, resolved through the document's own style names (so a German Überschrift 1 counts); the Title style is level 0 | File I/O |
docx.find_text | Indices of the body paragraphs containing text, as a vector | File I/O |
docx.replace_text | Replaces old with new everywhere text lives -- body, tables, text boxes, headers, footers, footnotes, endnotes, comments -- even where Word split the text across formatting runs | File I/O |
docx.set_paragraph | Replaces body paragraph i's text, keeping its paragraph style and its first run's character formatting | File I/O |
docx.insert_paragraph | Inserts a paragraph so it becomes body paragraph i; takes the same keywords as add_paragraph | File I/O |
docx.remove_paragraph | not described in a chapter yet | |
docx.add_heading | Appends a heading; level 0 is the Title style, 1-9 the Heading styles (created in the document's style sheet if it lacks them) | File I/O |
docx.add_paragraph | Appends a paragraph. size in points, color #rrggbb, align left/center/right/justify, style a paragraph style id (Quote) | File I/O |
docx.add_page_break | Appends a page break | File I/O |
docx.add_table | Appends a bordered table from a Table (its column names become a bold header row that repeats on each page), a matrix or a list of rows | File I/O |
docx.add_image | Appends a PNG, JPEG or GIF as its own paragraph | File I/O |
docx.tables | Every body table as a list of rows of cell texts | File I/O |
docx.set_cell | not described in a chapter yet | |
docx.comments | {author, date, text} records | File I/O |
docx.footnotes | not described in a chapter yet | |
docx.endnotes | not described in a chapter yet | |
docx.info | A record of the document properties (title, creator, created, modified, ...) plus counts: paragraphs, words, characters, tables, images, comments, headings | File I/O |
docx.set_info | not described in a chapter yet | |
docx.accept_changes | Accepts every tracked change (insertions kept, deletions dropped, formatting changes kept) in every part of the document; docx.reject_changes(doc) does the opposite | File I/O |
docx.reject_changes | not described in a chapter yet | |
docx.to_markdown | The content as Markdown: headings as #, tables as pipe tables, list paragraphs as - items | File I/O |
docx.to_latex | The content as LaTeX: Title as \title, headings as \section/\subsection, bold/italic/underline kept, list paragraphs as itemize, tables as tabular, images as \includegraphics,.. | File I/O |
docx.to_pdf | Converts to PDF by running LibreOffice headless in a private profile (so it neither needs nor disturbs an open LibreOffice) | File I/O |
docx.links | Every hyperlink in the body (tables included) as {text, url} records; internal links come back as #name | File I/O |
docx.add_link | Makes body paragraph i -- all of it, or the first occurrence of the text on (case-sensitive) -- a hyperlink to url | File I/O |
docx.add_comment | Attaches a comment to body paragraph i (or to the text on in it), creating the document's comments part when it has none | File I/O |
docx.bookmarks | not described in a chapter yet | |
docx.add_bookmark | Puts a bookmark named name around body paragraph i (or the text on in it) -- the target for add_cross_ref and #name links | File I/O |
docx.add_cross_ref | Appends a cross-reference to bookmark name at the end of body paragraph i: show="text" shows the bookmarked text (a REF field, filled in now with the true text), "page" its page.. | File I/O |
docx.fields | not described in a chapter yet | |
docx.add_field | Appends any field -- "PAGE", "NUMPAGES", "DATE \\@ \"d MMMM yyyy\"", "REF name \\h" -- to the end of body paragraph i, marked dirty so the word processor computes it on open;.. | File I/O |
docx.add_toc | Inserts a table-of-contents field for heading levels 1 to levels, before body paragraph at (or at the end), optionally under a title paragraph | File I/O |
docx.sections | Each section's page setup as a record: width, height, top, bottom, left, right (mm), orientation ("portrait"/"landscape"), start (next_page, continuous, even_page,.. | File I/O |
docx.page_setup | Changes page size ("A4", "A3", "A5", "B5", "Letter", "Legal", or [width, height]), orientation ("portrait"/"landscape", which swaps width and height) and margins.. | File I/O |
docx.add_section_break | Ends the current section at the end of the document; what is added next is a new section starting next_page, continuous, even_page or odd_page, with the same page setup until.. | File I/O |
docx.header_text | The text of a section's header (following inheritance from earlier sections), one line per paragraph, or none if it has none | File I/O |
docx.footer_text | not described in a chapter yet | |
docx.set_header | Sets a header's text, replacing its content (creating the header part if there is none) | File I/O |
docx.set_footer | not described in a chapter yet | |
docx.add_list_item | Appends a bulleted (kind="bullet") or numbered (kind="number") list paragraph at nesting level 0-8, creating the document's numbering definitions when it has none | File I/O |
docx.set_list | Makes existing body paragraph i a list item, or plain again with kind="none" | File I/O |
docx.add_column | Inserts a column so it becomes grid column at (default: appended), with one value per row | File I/O |
docx.add_footnote | Creates a footnote with text (\n starts a new paragraph in it) anchored after the first occurrence of on in body paragraph i, or at the end of the paragraph | File I/O |
docx.add_row | Inserts a row into body table table (0-based) so it becomes row at (default: appended) | File I/O |
docx.format_text | Formats existing text in body paragraph i: the first occurrence of on, every occurrence with all=true, or the whole paragraph when on is omitted | File I/O |
docx.line_spacing | Sets spacing for body paragraphs i through to (default: just i) | File I/O |
docx.merge_cells | Merges the rectangle of cells from (row1,col1) to (row2,col2), inclusive and 0-based, into one cell (a column span across, a vertical merge down) | File I/O |
docx.move_paragraph | Moves body paragraph from so that it becomes body paragraph to (as numbered after the move) | File I/O |
docx.split_cell | Undoes a merge: the merged cell containing grid cell (row,col) becomes its individual cells again, the text staying in the top-left one | File I/O |
docx.track_delete | Marks text in body paragraph i as a tracked deletion (w:del, the text kept as w:delText): the first occurrence of on, every occurrence with all=true, or all of the paragraph --.. | File I/O |
docx.track_insert | Inserts text into body paragraph i as a tracked insertion (w:ins by author, ISO 8601 date, default now): directly after the first occurrence of after, directly before the first.. | File I/O |
pdf.add_annotation | Adds a simple annotation to a page (page counts from 1) | File I/O |
pdf.add_attachment | Embeds a file under filename | File I/O |
pdf.add_bookmark | Adds a new outline entry titled title, pointing at page_index (one-based) | File I/O |
pdf.add_link | Adds a /Link annotation over rect= that jumps to target_page= (one-based) of the SAME document | File I/O |
pdf.add_page | Inserts a blank page at index (numbered from 1; one past the last page appends) | File I/O |
pdf.add_text | Stamps one line of text on a page with its baseline starting at (x, y) in PDF points from the bottom-left of the unrotated page (/Rotate and /CropBox are not compensated) | File I/O |
pdf.annotations | A page's annotations as a List of Records: index (Num, the handle pdf.remove_annotation takes), type (Str, the annotation's /Subtype verbatim — "Text", "Square",.. | File I/O |
pdf.attachments | The document's embedded files, listed via the catalog's /Names/EmbeddedFiles name tree, as a List of Records: filename (Str) and size (Num, the decompressed byte length) | File I/O |
pdf.crop_box | The page's /CropBox -- the region a viewer actually shows, which can be smaller than /MediaBox | File I/O |
pdf.crop_page | Sets a page's /CropBox to the given rectangle (PDF points) | File I/O |
pdf.delete_page | Removes page. Every other page's own resources, fonts and content are untouched | File I/O |
pdf.duplicate_page | Inserts a copy of page immediately after it | File I/O |
pdf.extract_attachment | The raw bytes of the first embedded file named filename; a name that is not there is a named error | File I/O |
pdf.extract_image | Decodes image number index (from pdf.images) of page page to an Image | File I/O |
pdf.extract_pages | A new PDF holding just the pages asked for | File I/O |
pdf.extract_text | Text reconstructed from a PDF's content streams | File I/O |
pdf.find_text | Searches every page's pdf.extract_text output for query (built on that function, not a separate reconstruction — the same warning below applies: a page extract_text cannot read is a.. | File I/O |
pdf.images | Lists the embedded images (image XObjects) of the pages asked for, default every page, as a List of Records: page (Num), index (Num, from 1 within the page -- the number.. | File I/O |
pdf.info | Reads what a PDF says about itself, without extracting any content | File I/O |
pdf.media_box | The page's /MediaBox -- the boundary a PDF prints on, in PDF points (1/72 inch) | File I/O |
pdf.merge | Joins several PDFs into one, in list order, keeping every page | File I/O |
pdf.move_page | Relocates page from so it becomes page to, keeping every other page's relative order | File I/O |
pdf.outlines | The document's bookmark/outline tree, flattened into a Table — one row per entry, depth-first | File I/O |
pdf.page_count | Counts a PDF's pages. src (string path, or Vec of bytes) is the document | File I/O |
pdf.remove_annotation | Removes the index-th entry of a page's /Annots array (the index pdf.annotations reports), deleting the underlying object too | File I/O |
pdf.render | Renders one page (numbered from 1) to an Image -- text, vector graphics, images and annotations, composited onto white -- at dpi dots per inch (a page is width_in_points * dpi / 72.. | File I/O |
pdf.replace_text | Changes text in an existing PDF and returns the edited file as a Vec of bytes (save with bytes_write) | File I/O |
pdf.reverse_pages | Reverses page order: the last page becomes the first and vice versa | File I/O |
pdf.rotate_page | Sets a page's /Rotate -- degrees a viewer turns the page CLOCKWISE before display | File I/O |
pdf.set_metadata | Writes into a PDF's /Info dictionary (creating it if the file has none), touching only the fields passed — a keyword left out is left exactly as it was, never cleared | File I/O |
pdf.split_at | Splits src into exactly two documents at index (numbered from 1): the first holds pages 1..index, the second index..page_count | File I/O |
pdf.split_every | Splits src into consecutive chunks of up to n pages each, in document order (the last chunk may be shorter) | File I/O |
pdf.strip_metadata | Removes a PDF's /Info dictionary entirely, and its catalog's /Metadata XMP stream reference if it has one (the XMP stream's own contents are not parsed — only the reference to it is.. | File I/O |
pdf.structural_diff | A coarse, non-content comparison: page count, per-page /MediaBox size, whether each document has an outline (/Outlines) and each document's total annotation count | File I/O |
pdf.text_diff | Page-by-page text diff of two documents, built entirely on pdf.extract_text/pdf.page_count | File I/O |
pdf.to_html | A simple HTML fragment for the pages asked for (default all; pages is positional, not a keyword): one <section class="page" data-page="N"> per page holding one <p> per paragraph, text.. | File I/O |
pdf.write_merge | Exactly pdf.merge, written to a file instead of returned | File I/O |
pdf.write_pages | Exactly pdf.extract_pages, written to a file instead of returned | File I/O |
image.load | not described in a chapter yet | |
image.luma | not described in a chapter yet | |
image.regions | Returns a Table, one row per non-empty label, ordered by label id — the regionprops-shaped measurement but as columns rather than a List of Records, so a measurement can be.. | Images |
image.blur | not described in a chapter yet | |
image.canny | not described in a chapter yet | |
image.bilateral | not described in a chapter yet | |
image.distance_transform | not described in a chapter yet | |
image.skeleton | not described in a chapter yet | |
image.fill_holes | not described in a chapter yet | |
image.contours | not described in a chapter yet | |
image.autocrop | not described in a chapter yet | |
image.sobel | Computes the 3x3 Sobel gradient over img's BT.601 luma (replicate/clamped border) | Images |
image.scharr | Same signature, same direction= convention, and the same border/luma handling as image.sobel, but with the Scharr 3x3 kernel ([-3,0,3; -10,0,10; -3,0,3], transposed for the.. | Images |
image.laplacian | Any other kernel_size is refused by name | Images |
image.gradient_magnitude | Gradient magnitude sqrt(gx^2 + gy^2) from the Sobel gradient over img's BT.601 luma — the same value image.sobel(img)/image.sobel(img, direction="both") returns, under its own more.. | Images |
image.rgb2hsv | Per-pixel RGB→HSV conversion (the whole-Image counterpart to the scalar to_hsv), reusing the exact same conversion the scalar builtin uses | Images |
image.hsv2rgb | Converts back to 8-bit RGB, rounding and clamping each channel to 0..255 | Images |
image.rgb2lab | Per-pixel sRGB→CIE L\*a\*b\* conversion (D65 white point), the whole-Image counterpart to the scalar to_lab, reusing its exact conversion math | Images |
image.lab2rgb | Converts back to 8-bit sRGB, clamped into gamut | Images |
image.watershed | Marker-controlled watershed segmentation (priority-flood/Meyer's algorithm): floods strictly by ascending surface value, 4-connected, growing each marker's labeled region outward; where.. | Images |
svg.rect | An axis-aligned rectangle with its top-left corner at (x, y) | Images |
svg.circle | A circle of radius r centred on (cx, cy); r must be 0 or more | Images |
svg.line | A straight segment from (x1, y1) to (x2, y2) | Images |
svg.path | An arbitrary path from the SVG path-data string d | Images |
svg.text | A text run anchored at (x, y) — which in SVG is the *baseline start*, not the top-left corner | Images |
sparse.from_triplets | not described in a chapter yet | |
sparse.from_dense | not described in a chapter yet | |
sparse.eye | not described in a chapter yet | |
sparse.diag | not described in a chapter yet | |
sparse.random | not described in a chapter yet | |
sparse.size | not described in a chapter yet | |
sparse.nnz | not described in a chapter yet | |
sparse.density | not described in a chapter yet | |
sparse.to_dense | not described in a chapter yet | |
sparse.get | not described in a chapter yet | |
sparse.triplets | not described in a chapter yet | |
sparse.transpose | not described in a chapter yet | |
sparse.add | not described in a chapter yet | |
sparse.sub | not described in a chapter yet | |
sparse.scale | not described in a chapter yet | |
sparse.mul | not described in a chapter yet | |
sparse.hadamard | not described in a chapter yet | |
sparse.solve | not described in a chapter yet | |
sparse.cg | not described in a chapter yet | |
sparse.gmres | not described in a chapter yet | |
sparse.bicgstab | not described in a chapter yet | |
sparse.diffmat | not described in a chapter yet | |
sparse.laplacian | not described in a chapter yet |
Not yet described
These names are in the engine and answer to a call, but no chapter table describes them yet. The list is computed by comparing the interpreter's table against the chapters, so it is the documentation backlog rather than a statement about the language.
accessed_at accuracy apply_edits base64_decode base64_encode bootstrap_ci brier bytes_read bytes_write casefold circuit_impedance clear_bit codepoints conformal coverage created_at dedent duration entropy exit file_info find_hex get_bit hex_decode hex_encode hexdump image image_regions indent invert is_readonly json_delete json_get json_set kfold kill levenshtein line_at line_col line_count line_delete line_insert line_range line_set modified_at nbytes pad_bytes path_absolute path_extension path_join path_name path_normalize path_parent path_relative_to path_stem pos_of preciseTimer printf process_is_running process_kill process_pid process_poll process_read process_read_stderr process_spawn process_wait r2 replace_bytes residual_acf reverse_bytes roc_auc sample_to_time set_bit setenv sha256 similar slice_at splice split_time strip_ansi time_to_sample timer toggle_bit unsetenv word_wrap