Qu

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_studyComputes 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
absAbsolute value on a real scalar/Vec/Mat; magnitude (sqrt(re^2 + im^2)) on a Complex scalar, CVec, or CMatCore maths
acfReturns a vector of length max_lag+1 (lag 0 through max_lag), the autocorrelation functionSignal processing
acosInverse trigonometric functions, single-argument only (the two-argument form is atan2, below)Core maths
acoshInverse hyperbolics. asinh is defined and finite on the whole real lineCore maths
adadeltaPer-parameter learning rates derived from the running gradient history, given params (a Tensor to optimize) and lr (a number, default 0.001)Statistics & ML
adagradPer-parameter learning rates derived from the running gradient history, given params (a Tensor to optimize) and lr (a number, default 0.001)Statistics & ML
adamThe 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
adamaxThe 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
adamwThe 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_thresholdLocally 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
adcQuantises 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
addThe operators as named functions, so an operation can be passed where a name is what you can passCore maths
add_edgeNodes are named; an edge carries an optional weight, defaulting to 1Collections & strings
add_markerAdded in v0.2.4. Annotates an instant — an impact, a fault injection — at time seconds on the signal's own (origin-aware) axisSignal processing
add_nodeNodes are named; an edge carries an optional weight, defaulting to 1Collections & strings
add_noiseAdds 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_regionAdded in v0.2.4. Annotates an interval rather than an instantSignal processing
affine_identityReturns the 3x3 identity Mat — a no-op transform, useful as a composition base caseImages
affine_rotateReturns 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_scaleBuilds a scaling transform for imwarpImages
affine_shearReturns a new 3x3 Mat encoding that shearImages
affine_translateReturns a new 3x3 homogeneous-coordinate Mat encoding that translationImages
afterafter returns the piece of s past the first mark; before returns the piece up to itCollections & strings
after_lastReturns a Str: like after/before but searching from the end — the pair to reach for on a path or a dotted nameCollections & strings
algorigramRenders 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
allWith 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
allpassReturns a Model (kind "filter", field sos, one section)Signal processing
andReturns 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 guardCollections & strings
angleComplex 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
animateCalls 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 JavaScriptPlotting
annotateSame as text — label text (string) at (x, y) (numbers, data units) — but also draws a marker dot at that pointPlotting
anyWith 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
appendReturns a NEW Vec/List with value added at the endCollections & strings
append_allAppends s to the end of the file at path, creating it if absentCollections & strings
append_textAppends s to the end of the file at path, creating it if absentCollections & strings
applyReturns 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_calibrationAdded in v0.2.4. The general linear calibration physical = slope*raw + offset that the two calibrate forms are specific instances ofSignal processing
apply_calibration_curveAdded 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_gainAdded 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 accordinglySignal processing
apply_offsetAdded in v0.2.4. Adds a constant to every sample (a DC trim, a tare), composed into the calibration record like any other linear stepSignal processing
aproposReturns a List of strings: every builtin name containing that substring, in engine-registration orderREPL & diagnostics
ar_modelFits 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
arcDraws part of a circle, as an open strokePlotting
areaFilled area under the curve (x, y) (equal-length numeric Vecs) down to y=0; the zero-baseline special case of fill_betweenPlotting
argComplex 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
argmax0-based index of the first-occurring minimum/maximum element of x (a scalar, Vec, or Mat/Signal, flattened)Core maths
argmeanIndex 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
argmedianIndex into x (a Vec or flattened Mat/Signal) of the element sitting at the median positionCore maths
argmin0-based index of the first-occurring minimum/maximum element of x (a scalar, Vec, or Mat/Signal, flattened)Core maths
argquantileIndex 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
argsortReturns a Vec of number (0-based indices): the permutation that would sort x — the index-returning sibling of sort, same convention as argmin/argmaxCollections & strings
argvReturns 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
arimaFits 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
arrowDraws an arrow from (x0, y0) to (x1, y1) (numbers, data units), no labelPlotting
arrowtextSame as arrow — from (x0, y0) to (x1, y1) (numbers, data units) — but the arrowhead ends in a point labeled with text (string)Plotting
as_textReturns a List of Str (each element formatted the way print would), so [1, 2, 3].as_text().join(", ") worksCollections & strings
ascReturns a number: the code point of its first characterCollections & strings
asinInverse trigonometric functions, single-argument only (the two-argument form is atan2, below)Core maths
asinhInverse hyperbolics. asinh is defined and finite on the whole real lineCore maths
astar_mrmrA 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
atReturns a Record: one row of the table by position, always positional even when the table carries a string indexCollections & strings
atanInverse trigonometric functions, single-argument only (the two-argument form is atan2, below)Core maths
atan2Four-quadrant arctangent in radians, (-π, π]: the angle of the point (x, y), so atan2(1, -1) is 3π/4 where atan(1/-1) would say -π/4Core maths
atanhInverse hyperbolics. asinh is defined and finite on the whole real lineCore maths
availableReturns an integer: bytes waiting on the OS's serial input buffer right now, without blockingConcurrency
avgpool2dDownsamples 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 maxStatistics & ML

B

band_powerReturns the power in that frequency band by Parseval, normalised by N^2 so a tone of amplitude A reads A^2/2Signal processing
band_zeroReturns a new spectrum at the same Fs, N and scaling with that band cleared — an ideal brick-wall notchSignal processing
bandwidthThe 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
barBar chart: x (Vec of numbers or strings, category positions/labels) and y (Vec of numbers, bar heights) must be equal lengthPlotting
basin_hoppingReturns a Model (kind "minimize", same fields as minimize)Signal processing
beamformDelay-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
beeswarmEvery sample drawn, nudged sideways only as far as it must be to clear its neighbours, so the WIDTH is the countPlotting
beforeafter returns the piece of s past the first mark; before returns the piece up to itCollections & strings
before_lastReturns a Str: like after/before but searching from the end — the pair to reach for on a path or a dotted nameCollections & strings
berncdfCumulative Bernoulli distribution P(X <= k), a step function of floor(k)Statistics & ML
bernfitMaximum-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
berninvInverse 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
bernpdfProbability mass of the Bernoulli distribution at k (a number, vector or matrix, elementwise); zero at a non-integer or out-of-support kStatistics & ML
bernrndRandom draws from the Bernoulli distributionStatistics & ML
bernstatMean and variance of the Bernoulli distribution with these parameters, as a result with fields .mean and .varStatistics & ML
besselReturns a Model (kind "filter", field sos)Signal processing
besseliModified 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
besseljBessel 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
besselkModified 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
besselyBessel 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
betaThe beta function B(a, b) = Γ(a) Γ(b) / Γ(a + b) for a, b > 0, elementwise (number, or same-shape Vec/Mats)Core maths
betacdfBeta cumulative distribution on [0, 1] -- the regularized incomplete beta function I_x(a, b)Statistics & ML
betafitMaximum-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
betaincRegularized 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
betainvInverse of betacdf. Returns the same shape as p, in [0, 1]Statistics & ML
betapdfBeta probability density. Returns the same shape as xStatistics & ML
betarndRandom draws from the beta distributionStatistics & ML
betastatMean and variance of the beta distribution with these parameters, as a result with fields .mean and .varStatistics & ML
bin2decReads a binary digit string as a numberCollections & strings
binocdfCumulative binomial distribution P(X <= k), a step function of floor(k)Statistics & ML
binofitMaximum-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
binoinvInverse 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
binomialExact 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
binopdfProbability mass of the binomial distribution at k (a number, vector or matrix, elementwise); zero at a non-integer or out-of-support kStatistics & ML
binorndRandom draws from the binomial distributionStatistics & ML
binostatMean and variance of the binomial distribution with these parameters, as a result with fields .mean and .varStatistics & ML
bitandReturns a number: the bitwise AND of a and b as 64-bit integersCollections & strings
bitcmpReturns a number: the bitwise complement (!a) as a 64-bit integerCollections & strings
bitorReturns a number: the bitwise ORCollections & strings
bitshiftShifts an integer's bits left or rightCollections & strings
bitxorReturns a number: the bitwise XORCollections & strings
blackmanReturns a length-n real vectorSignal processing
blob_statsPer-region area, centroid and bounding box, from a labelled image (identical operation to regionprops above)Images
block_processCuts x into consecutive blocks, calls f on each, and concatenates the resultsSignal processing
blocksReturns a list of blocks, so for b in s.blocks(4096) iterates it with the ordinary for loopSignal processing
blurApplies a fixed 3x3 box-average blur kernelImages
blur_backdropFigure-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
bodeDraws a complete two-panel Bode figure — magnitude in dB above, phase in degrees below, both against a log frequency axis — and returns NothingSignal processing
bode_magnitudeMagnitude half of a Bode plot: 20*log10(|Z|) vs. log-scaled frequencySignal processing
bode_phasePhase half of a Bode plot: arg(Z) in degrees vs. log-scaled frequencySignal processing
boxToggles the panel's bounding boxPlotting
boxplotOne 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-whiskerPlotting
bubbleScatter 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/maxPlotting
builtinsReturns a List of strings: every name the engine answers to (hundreds of entries; the exact count grows as builtins are added)REPL & diagnostics
butterReturns a Model (kind "filter", field sos)Signal processing
buttordReturns 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
bvpSolves 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_evalEvaluates 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
bwareaopenLabels internally (8-connectivity, matching MATLAB's default) and zeroes out every blob whose pixel count is below min_areaImages
bwlabelConnected-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

calibrateAdded in v0.2.4. Turns a raw Signal into a physically calibrated one, scaling the samples and stamping the resulting unitSignal processing
capacitor1/(jwC)Signal processing
capitalizeUppercases the first character, leaves the rest untouchedCollections & strings
captureRuns 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
castReturns a value of that kind. A conversion that is not defined is an error, not a best effortCollections & strings
catMATLAB-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
cbrtReal cube root, elementwise — unlike x^(1/3), correctly handles a negative x (cbrt(-8) = -2, not NaN)Core maths
cdChanges the working directory to path (a Str) for the whole process, so every later relative path in the script resolves from thereFile I/O
ceilStandard rounding functions, elementwise: floor toward negative infinity, ceil toward positive infinity, round to the nearest integer (half away from zero)Core maths
channelCreates a new, empty channel. Returns a Channel handle (type(ch) == "channel"); cloning it shares the same underlying queue, not a separate copyConcurrency
channel_lenHow many messages are queued right now on channel ch, without consuming any of themConcurrency
channel_recvBlocks the calling thread until a value is available on channel ch, then pops and returns it (FIFO — oldest channel_sendd value first)Concurrency
channel_sendPushes value (any value, any type) onto channel ch's queue and wakes one waiting channel_recvConcurrency
channel_try_recvNon-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
charsReturns a List of one-character StrsCollections & strings
cheb1ordSame arguments and record as buttord, for cheby1(r.order, rp, r.kind, r.wn, fs)Signal processing
cheb2ordSame arguments and record as buttord, for cheby2(r.order, rs, r.kind, r.wn, fs)Signal processing
chebdiffChebyshev spectral differentiation (the cheb of Trefethen's *Spectral Methods in MATLAB*)Signal processing
cheby1Returns a Model (kind "filter", field sos)Signal processing
cheby2Returns a Model (kind "filter", field sos)Signal processing
check_gradsVerifies 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
chi2cdfChi-square cumulative distribution P(X <= x) at x (a number or vector, elementwise) with k degrees of freedomStatistics & ML
chi2invInverse of chi2cdf: the chi-square critical value with k degrees of freedom, chi2inv(0.95, 1) = 3.841Statistics & ML
chi2pdfChi-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 overflowingStatistics & ML
chi2rndRandom draws from the chi-square distributionStatistics & ML
chi2statMean and variance of the chi-square distribution with these parameters, as a result with fields .mean and .varStatistics & ML
chirpIdentical to sweep above — same four positional arguments (start frequency, end frequency, sample rate, sample count) and the same method= (string, "linear" default or..Plotting
chisquareDraws from the chi-square distribution with k degrees of freedom (a positive integer), same rows/cols/seed= shape as randStatistics & ML
cholLower-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-definiteCore maths
chrReturns a one-character Str from chr, and a number — the code point — from ordCollections & strings
circleDraws a circle centered at (cx, cy) (numbers, data units) with radius r (number, data units)Plotting
circuitBuilds a circuit from a spec string and a flat parameter vectorSignal processing
circuit_fitNonlinear least-squares fit of a circuit's parameters to measured impedanceSignal processing
claheContrast-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
clampElementwise clamp of x (a scalar, Vec, or Mat/Signal) into [lo, hi]Core maths
clipElementwise clamp of x (a scalar, Vec, or Mat/Signal) into [lo, hi]Core maths
closeFlushes and releases a file handleFile I/O
cmLength 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
cmykBuilds a colour from the printer's subtractive space: cyan c, magenta m, yellow y, key/black k, each a number 0–1Plotting
coherenceReturns a single number: the largest inner product between any two different normalised columns of ANoise
colorbarAccepted, 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 drawnPlotting
colormapSets the current panel's categorical/sequential palette to name (string — see the Markers & Styling reference below for the full list)Plotting
colsRow / 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 NumCore maths
compareReturns a number: −1, 0 or 1, so it can drive a sort directlyCollections & strings
compileAttaches 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
complexReturns a Complex. 3 + 4j is the literal form; this is for computed componentsCollections & strings
condThe 2-norm condition number of A (an r×c Mat or CMat) — the ratio of its largest to smallest singular valueCore maths
confusion_matrixDraws 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
conjComplex conjugate (negates the imaginary part); passes a real x through unchangedCore maths
containsReturns a bool: membership test via structural equalityCollections & strings
contourIso-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
contourfIso-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
convReturns a vector of the length implied by modeSignal processing
conv1dSlides 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
conv2dSlides 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_unitAdded 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_fileCopies src to dst, leaving the original in placeFile I/O
corrPearson correlation between two length-N numeric vectors x and yStatistics & ML
corr_heatmapComputes the pairwise Pearson correlation of Table t's numeric columnsPlotting
corrcoefCalled on an N-row, D-column matrix or table M, returns the full (D, D) matrix of pairwise Pearson correlations between its columnsStatistics & ML
corrmatComputes the pairwise Pearson correlation of Table t's numeric columnsPlotting
corrplotComputes the pairwise Pearson correlation of Table t's numeric columnsPlotting
cosStandard trigonometric functions, computed elementwiseCore maths
coshHyperbolic sine/cosine/tangent, elementwiseCore maths
cothThe other three hyperbolics: coth(x) = cosh(x)/sinh(x), sech(x) = 1/cosh(x), csch(x) = 1/sinh(x)Core maths
countReturns a number: how many non-overlapping times sub occurs in s (non-overlapping so it agrees with replace)Collections & strings
covSample covariance between two length-N numeric vectors x and y, N-1 denominator — the same convention var and std useStatistics & ML
cpe1/(Q (jw)^n) — constant-phase elementSignal processing
cqtConstant-Q transform: log-spaced bins sharing one Q = f/bandwidth, so a musical interval spans the same number of bins at every pitchSignal processing
crcTextbook unreflected, zero-initialized polynomial division: the message is shifted left by the CRC width and divided mod 2Signal processing
crc32Returns the standard CRC-32 (IEEE 802.3, reflected, initial value and final XOR 0xFFFFFFFF) as a number: crc32("123456789") is 3421780262, i.e. 0xCBF43926Collections & strings
crc_checkDivides the whole codeword and reports whether the remainder is all zerosSignal processing
create_filemake_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_factorpeak(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 argumentCore maths
cropExtracts that sub-rectangle. Returns a new Image of exactly width x height pixelsImages
crossCross product of two 3-element vectors, returned as a Vec: cross([1, 0, 0], [0, 1, 0]) is [0, 0, 1]Core maths
cross_valk-fold cross-validation of anything that fits a modelStatistics & ML
cs_guaranteeReturns a single number: the largest sparsity level that the matrix's coherence alone can *prove* recoverableNoise
cs_recoverCompressed-sensing reconstruction of a sparse vector x from an M×N sensing matrix A and a length-M measurement vector yNoise
cschThe other three hyperbolics: coth(x) = cosh(x)/sinh(x), sech(x) = 1/cosh(x), csch(x) = 1/sinh(x)Core maths
csdReturns 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
csv2jsonNot 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
csv2xmlstr (string, CSV text) is converted to XML: exactly xmlify(parse_csv(str)). Returns a stringFile I/O
csvifyConverts table (Table) to CSV text — exactly write_csv's own formatting (Table::to_csv), just returned as a string instead of written to a fileFile I/O
ctransposeConjugate transpose (Hermitian): transpose plus elementwise complex conjugationCore maths
cumprodRunning 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
cumsumReturns the running sum, same type/length as x; a Signal input stays a Signal with the same FsCollections & strings
cumtrapzRunning trapezoid integral: the result has the shape of y, starts at 0, and its last element equals trapzSignal processing
cur_dircur_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 scriptsFile I/O
curve_fitReturns a Model (kind "curve_fit") with fields params (a length-P vector), cost (a number, residual sum of squares), converged (a boolean)Signal processing
cutReturns a new Signal at the SAME Fs, shorter than sigSignal processing
cv_stabilityRepeats 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 repeatsStatistics & ML
cwtContinuous 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 scalesSignal processing

D

daily_profileReturns a length-7 real vector, one bin per day-of-week -- so a weekday-against-weekend difference separates outSignal processing
dbAlias of mag2db(x) above (20*log10(x), amplitude convention) — the bare SciPy/general-DSP-flavored spellingSignal processing
db2magReturns the same shape: 10^(db/20) — inverse of mag2dbSignal processing
db2powReturns the same shape: 10^(db/10) — inverse of pow2db/db_powerSignal processing
db_powerAlias of pow2db(x) above (10*log10(x), power convention) — the bare SciPy/general-DSP-flavored spellingSignal processing
dbfsPeak level relative to full scale: 20*log10(peak(abs(x)) / full_scale)Core maths
dbscanDensity-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
dctReturns a length-N real vectorSignal processing
dec2binReturns a Str of 0/1 digits, no prefixCollections & strings
dec2hexReturns a Str: uppercase hex digits, no prefixCollections & strings
decode_canAdded 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 thresholdSignal processing
decode_i2cAdded 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_spiDecodes clocked SPI traffic into bytes, sampling each data line at whichever clock edge CPOL and CPHA selectSignal processing
decode_uartDecodes asynchronous serial frames into bytes at a stated bit rateSignal processing
deconvPolynomial 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 == bStatistics & ML
delayReturns the SAME length as x, shifted later by n with the vacated head zero-filled and whatever runs off the end droppedSignal processing
delta_eCompares colours a and b (each any accepted colour string) in CIE76 Lab space and returns a single number: the perceptual distancePlotting
denseOne 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 rowStatistics & ML
dense_layerBuilds 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
describePandas-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
detDeterminant of a square Mat or CMat, via LU decompositionCore maths
detect_saturationHas 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
detrendSubtracts a least-squares polynomial trend from x, a length-N number vectorNoise
device_usedReturns 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
dftReturns 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
diagOverloaded 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_pipelineRenders a |> pipe chain as a left-to-right chain of labeled boxes, one per stagePlotting
dictReturns a Dict, insertion-orderedCollections & strings
diffReturns 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 FsCollections & strings
diff_linesA 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
dirThe bare names inside path (a Str), sorted — "a.qu", not "tools/a.qu"File I/O
dir_existsWhether path (a Str) exists and is a regular file / a directoryFile I/O
diskBuilds 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 pixelImages
dispWrites its arguments, space-separated, and a newline, to stdoutCollections & strings
distinctReturns the same type: the unique values, in the order they first appear — which unique does not promise, since it sortsCollections & strings
distortPut the signal through a nonlinearity: clip, soft, crossover, harmonic, quantizeNoise
divThe operators as named functions, so an operation can be passed where a name is what you can passCore maths
dominant_frequencyReturns 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/NSignal processing
donutPie chart with a hollow centerPlotting
dotDot product of two equal-length vectors a, b (each a Vec; a length mismatch errors)Core maths
double_bufferReturns a double_buffer handle; front AND back both start equal to initialCollections & strings
downsampleLowers 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 sampleSignal processing
draw_arrowA zero-length shaft draws only the (single-point) shaft, with no head, since it has no defined directionImages
draw_circlefilled=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_lineReturns a new Image, same dimensions as imgImages
draw_rectfilled=true paints the whole interior (thickness is ignored — a fill has no stroke width); filled=false (default) strokes the four edges with the given thicknessImages
draw_scale_barDraws 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
dropReturns the same type as xs: the first n elements (take) or everything after them (drop)Collections & strings
drop_rowReturns a Table without those rows, by positionCollections & strings
dropoutZeroes 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_layerBuilds one unfitted dropout-layer spec for use inside a sequential stack: rate a number in [0, 1), the fraction of activations to zero during trainingStatistics & ML
duty_cycleReturns 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 showsSignal processing
dwtReturns 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

ecdfEmpirical cumulative distribution, one staircase per argumentPlotting
echoWrites its arguments, space-separated, and a newline, to stdoutCollections & strings
edaOne-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_detectApplies a fixed 3x3 discrete Laplacian edge filter, highlighting intensity discontinuitiesImages
edgesSame 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
eigEigenvalues (and, for symmetric A, real eigenvectors) of a square n×n Mat ACore maths
elapsedReturns a number: elapsed seconds so farREPL & diagnostics
eledivThe .*, ./ and .^ family: always elementwise, whatever the shapesCore maths
elemulThe .*, ./ and .^ family: always elementwise, whatever the shapesCore maths
elepowThe .*, ./ and .^ family: always elementwise, whatever the shapesCore maths
ellipReturns a Model (kind "filter", field sos)Signal processing
ellipkeComplete 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
ellipordSame arguments and record as buttord, for ellip(r.order, rp, rs, r.kind, r.wn, fs)Signal processing
ellipseDraws an ellipse centered at (cx, cy) (numbers) with semi-axis radii rx and ry (numbers, data units along x and y respectively)Plotting
emdEmpirical Mode Decomposition: splits x into oscillatory intrinsic mode functions (IMFs, highest frequency first) plus a residual trend, via the standard sifting algorithmSignal processing
emfAdds 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 edgeNoise
end_timeAdded 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 durationSignal processing
ends_withReturns a bool: true if s ends with suffixCollections & strings
energyReturns a single number, sum(x.^2) — total signal energySignal processing
enobReturns a single number, bits — effective number of bits, inverting 6.02·bits + 1.76 on the measured SINADSignal processing
enob_estimateReturns a single number, bits — effective number of bits, inverting 6.02·bits + 1.76 on the measured SINADSignal processing
enum_valuesReturns 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
eofChecks whether f (file handle, opened readable) has any bytes left to read from the current positionFile I/O
epsMachine 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
erfThe 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
erfcThe 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
erfcinvInverse complementary error function, elementwise: erfc(erfcinv(y)) = y for y in [0, 2], with erfcinv(0) = inf, erfcinv(2) = -inf and erfcinv(1) = 0Core maths
erfinvInverse error function, elementwise: erf(erfinv(y)) = y for y in [-1, 1], with erfinv(1) = inf and erfinv(-1) = -infCore maths
errorNever returns normally — control passes to the nearest enclosing try/catch, where the caught exception object exposes the string as .message; uncaught, it aborts the scriptREPL & diagnostics
errorbarDraws 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 unitsPlotting
estimateEstimation-family only: reads a point estimate off a filter state Record state with no argumentsStatistics & ML
estimate_complexityTakes 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_frequencyReturns 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/NSignal processing
execRuns program (a Str) and waits, capturing what it printedFile I/O
expReturns exactly the same type and shape as xCore maths
exp2Returns exactly the same type and shape as xCore maths
expcdfExponential cumulative distribution with mean mu (MATLAB's convention; note exponential(rate) draws take a rate)Statistics & ML
expfitMaximum-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
expintThe exponential integral E1(x) = ∫ₓ^∞ e^-t / t dt for x > 0, elementwise (real scalar, Vec, Mat or Signal)Core maths
expinvInverse of expcdf, -mu * log(1 - p)Statistics & ML
explainThe 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
exploreWrites a self-contained HTML page to path (string) with one slider per parameter of function "fn" (string)Plotting
expmMatrix 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
expm1e^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
exponentialExponential 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
exppdfExponential probability density with mean muStatistics & ML
exprndRandom draws from the exponential distributionStatistics & ML
expstatMean and variance of the exponential distribution with these parameters, as a result with fields .mean and .varStatistics & ML
extendReturns 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
eyeThe n×n identity matrix (ones on the diagonal, zeros elsewhere)Core maths

F

f1Classification 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
factorPrime factors of the positive integer n, ascending and with multiplicity, as a Vec whose product is n; factor(1) is [1]Core maths
factorialn! for a non-negative integer number or Vec of themCore maths
fall_timeReturns a single number: the transition time of the first complete rising (respSignal processing
falling_edgesReturns 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
fcdfF cumulative distribution at x with d1 (numerator) and d2 (denominator) degrees of freedomStatistics & ML
fftOn 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
fftcrfft returns a length-floor(N/2)+1 complex vector, the one-sided half-spectrum; fftc returns a length-N complex vector, the full spectrumSignal processing
fftrDeprecated — 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 backwardsSignal processing
fifoReturns a fifo handle: a new, empty ring bufferCollections & strings
figureClears/resets the whole figure (all panels), starting a fresh onePlotting
figure_backgroundSets the current figure's SVG background fill to color (string: "#rrggbb" hex or a CSS named colour; default "#ffffff"), passed straight through, unparsedPlotting
figure_sizeSets canvas size either from w, h (numbers, raw units) or from a named journal-column preset string (e.g. "ieee1")Plotting
file_existsWhether path (a Str) exists and is a regular file / a directoryFile I/O
file_historyThe saved versions of path, newest first, as a table with columns version (the id), saved (UTC time) and bytesFile I/O
file_sizeReports a file's size without opening itFile I/O
file_versioningTurns file history on (true) or off (false) for the rest of the run; with no argument, changes nothingFile I/O
fill_betweenA 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 intervalPlotting
fill_missingx with the missing samples patched, same length, so a Signal keeps its FsNoise
fillnaReplaces every NaN (the missing-value marker) in a vector or matrix by value, leaving every other entry, inf included, untouchedStatistics & ML
filterReturns a Table containing only the rows where mask is trueCollections & strings
filter_baReturns a same-length vector or SignalSignal processing
filter_from_sosReturns a Model (kind "filter", field sos) that works with sosfilt, filtfilt, freqz, fvtool, filter_info, bode and the rest, for coefficients designed elsewhereSignal processing
filter_from_tfReturns a Model (kind "filter")Signal processing
filter_from_zpkReturns a Model (kind "filter", field sos) for H(z) = k * prod(z - z_i) / prod(z - p_i)Signal processing
filter_infoReturns 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_initReturns 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_nextReturns a new "filter_state" Model (field y, a number, holds the filtered output)Signal processing
filtfiltReturns a same-length vector or Signal, same Fs-preserving convention as sosfiltSignal processing
findOne argument: identical to where(mask) — the indices where a boolean mask is true, as a VecCore maths
find_clippingSame detection as is_clipped, same keywords, but returns *where*Signal processing
find_edgesThe reported positions are taken at level either way, so switching hysteresis on to reject glitches does not move the measurements it protectsSignal processing
find_missingThe indices of the missing samples, as a number vectorNoise
find_outliersThe indices of the samples a criterion flags, as a number vector (same shape of answer as find_peaks)Noise
find_peaksKwarg names match SciPy; the original min_height/min_distance/min_prominence names are still accepted as aliasesSignal processing
find_pulsesReturns 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_triggerReturns 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_crossingsfind_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
findpeaksMATLAB-style [peaks, locations] = findpeaks(x, ...)Signal processing
finvInverse of fcdf -- the F critical value: finv(0.95, 5, 10) = 3.326Statistics & ML
fir1Returns a Model (kind "filter", field b, a length-n+1 vector)Signal processing
firlsReturns a Model (kind "filter", field b, a length-n+1 vector)Signal processing
firpmThe MATLAB name for remez: same arguments, same resultSignal processing
firstReturns the first (first) or last (last) element (same element type as xs holds), or none when xs is emptyCollections & strings
fitRuns 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_scalerFits 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 aboveStatistics & ML
fixRounds toward zero (fix(-2.7) is -2, fix(2.7) is 2); the MATLAB name for truncCore maths
flattenReturns a flat List: one level of nesting removedCollections & strings
flipReverses row order (flipud, dim=1) or column order (fliplr/mirror, dim=2) of A, a Str, Vec, Mat, or ImageCore maths
fliplrReverses row order (flipud, dim=1) or column order (fliplr/mirror, dim=2) of A, a Str, Vec, Mat, or ImageCore maths
flipudReverses row order (flipud, dim=1) or column order (fliplr/mirror, dim=2) of A, a Str, Vec, Mat, or ImageCore maths
floorStandard rounding functions, elementwise: floor toward negative infinity, ceil toward positive infinity, round to the nearest integer (half away from zero)Core maths
fminbndMinimises a function of one number on a closed intervalSignal processing
foldReturns the final accumulated value (whatever type f produces)Collections & strings
fontfamilySets the figure-wide font (string name, inherited by every title/label/tick/legend)Plotting
fontsizeA 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
fopenOpens a file for reading, writing, or appendingFile I/O
foreground_maskThresholds img at level, then applies imopen(radius) to remove noise specksImages
formatInterpolation ({x:.2f}) reads better inline; format is for a pattern held in a variableCollections & strings
forwardRuns 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
fpdfF probability density. Returns the same shape as xStatistics & ML
freqzReturns a length-n complex vector (CVec), the response H(e^{jω}) at n points from DC to Nyquist inclusiveSignal processing
frndRandom draws from the F distributionStatistics & ML
fsolveSolves the nonlinear system f(x) = 0Signal processing
fstatMean and variance of the F distribution with these parameters, as a result with fields .mean and .varStatistics & ML
fuzzy_pid_initA Mamdani fuzzy PD-type controller's initial state — the classic 2-input (error, error_dot), 1-output textbook fuzzy inference systemSignal processing
fvtoolMATLAB's Filter Visualization Tool: a 2x2 figure (magnitude response in dB, phase, group delay, impulse response) built from freqz/group_delay/sosfiltSignal processing
fzeroReturns a single number, the rootSignal processing

G

gainReturns the same shape as x, scaled by 10^(db/20) — the AMPLITUDE convention, the same factor of 20 as db2magSignal processing
gamcdfGamma cumulative distribution with shape a and scale b (mean a*b) -- MATLAB's parameterisation, not a rateStatistics & ML
gamfitMaximum-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
gaminvInverse of gamcdf, same shape/scale parametersStatistics & ML
gammaThe gamma function (gamma(n) = (n-1)! for a positive integer n) and its natural log (lgamma(x) = ln|gamma(x)|)Core maths
gammaincRegularized 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
gampdfGamma probability density, shape a, scale bStatistics & ML
gamrndRandom draws from the gamma distributionStatistics & ML
gamstatMean and variance of the gamma distribution with these parameters, as a result with fields .mean and .varStatistics & ML
gaussian_processGaussian-process regression on an N-row, D-column matrix X and a length-N target yStatistics & ML
gcdGreatest common divisor of two integers (always non-negative; gcd(0, 0) is 0)Core maths
generateRuns 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
geocdfCumulative geometric distribution P(X <= k), a step function of floor(k)Statistics & ML
geofitMaximum-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
geoinvInverse 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
geopdfProbability mass of the geometric distribution at k (a number, vector or matrix, elementwise); zero at a non-integer or out-of-support kStatistics & ML
georndRandom draws from the geometric distributionStatistics & ML
geostatMean and variance of the geometric distribution with these parameters, as a result with fields .mean and .varStatistics & ML
gerischerZg/sqrt(k + jw) — a coupled chemical reactionSignal processing
getget 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 ignoredCollections & strings
getenvReads one environment variableFile I/O
globEvery 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 entryFile I/O
gmm_modelGaussian 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
goertzelReturns 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_freqReturns a single complex scalar or a length-K CVec, same batching as goertzel aboveSignal processing
gpu_matmulWebGPU-accelerated matmul via qu-gpu, same A/B shape requirements and r×c Mat return as matmul; only present in builds compiled with --features gpuCore maths
gpu_probe_infoReturns 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
gradTakes 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
gradientNumerical 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_modelRegression-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
graphOptional named directed (bool, default false)Collections & strings
grayscaleConverts RGB → luma via ITU-R BT.601 weights (matches plotting.rs's contrast_text_color)Images
grepReturns a List of the matching (or non-matching) LINES — regex_find_all returns the matched substrings themselves, a different thingCollections & strings
gridCalling grid(...) as a function is accepted but is a no-op — only the bare command form actually changes anythingPlotting
grid_searchCross-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_envBuilds 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_aggReturns a Table: one row per distinct value of group_col, with value_col aggregatedCollections & strings
group_delayReturns a length-n real vector, -dφ/dω in samples, same n-point/frequency-axis convention as freqzSignal processing
groupbarGrouped (side-by-side) bar chart: x (Vec, category positions) and y (Mat or list of Vecs, one series per group of bars)Plotting
gru_cellOne 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_forwardUnrolls 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 takesStatistics & ML
gru_initBuilds 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

h5infoLists what is inside an HDF5 fileFile I/O
h5readReads one dataset from an HDF5 file with a built-in pure-Rust reader (no HDF5 library needed)File I/O
hammingReturns a length-n real vectorSignal processing
hamming74_decodeComputes each block's syndrome, flips the bit it names, and recovers the dataSignal processing
hamming74_encodeHamming(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
hampelOutlier removal: replaces a sample by the local median only when it is more than n_sigma robust deviations (1.4826 × MAD) from itNoise
hankelHankel 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
hannReturns a length-n real vectorSignal processing
has_edgehas_edge(g, a, b) returns a bool; neighbors(g, name) returns a List of Str node idsCollections & strings
has_keyReturns a bool: whether the dict has that key, without reading itCollections & strings
havriliak_negamiRh/(1 + (jw tau)^a)^gSignal processing
headReturns the first (head) or last (tail) n elements/rows, same type as sCollections & strings
heatmapGrid of colored cells: matrix is a Mat, each cell coloured by its own value scaled to the matrix's own min/maxPlotting
helpPrints 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
hessianTakes a scalar-valued function f and a point x, and returns the n x n matrix of second derivatives, symmetrizedREPL & diagnostics
hex2decReads a hexadecimal digit string as a numberCollections & strings
hexbinThe 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 blobPlotting
high_timeReturns 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 otherwiseSignal processing
hilbThe 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
hilbertReturns a length-N complex vector (CVec), the analytic signal x + j*H[x]Signal processing
histBins 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
histeqGlobal histogram equalization: builds a BT.601-luma cumulative distribution and remaps intensities to spread across the full rangeImages
histogramBins 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_missThe 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
hlineDraws a horizontal reference line spanning the whole panel at y (number, data units)Plotting
hmmBuilds 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_profileReturns a length-24 real vector, one bin per hour-of-daySignal processing
hslBuilds 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
hstackNamed equivalents of bracket-literal block concatenation ([a, b] horizontally / [a; b] vertically)Core maths
hsvBuilds a colour from hue h (number, degrees, 0–360), saturation s (number, 0–1) and value/brightness v (number, 0–1)Plotting
html2mdConverts the same subset back to Markdown; malformed HTML degrades to its text rather than erroringCollections & strings
http_getIssues 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_decodeInverse 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 bytesFile I/O
huffman_encodeCanonical Huffman coding of data (a Str, or a Vec of 0-255 byte values)File I/O
humAdds simulated mains pickup to x, a length-N signal vector, given the sample rate fs in HzNoise
hurst_exponentReturns a single number: 0.5 is a random walk, above that persistent, below it mean-reverting — long-range dependenceSignal processing
hygecdfCumulative hypergeometric distribution P(X <= k), a step function of floor(k)Statistics & ML
hygeinvInverse 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
hygepdfProbability mass of the hypergeometric distribution at k (a number, vector or matrix, elementwise); zero at a non-integer or out-of-support kStatistics & ML
hygerndRandom draws from the hypergeometric distributionStatistics & ML
hygestatMean and variance of the hypergeometric distribution with these parameters, as a result with fields .mean and .varStatistics & ML
hypotsqrt(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 infCore maths

I

icaThe (N, k) recovered sources directly, as pca(X, k) sits beside pca_modelStatistics & ML
ica_modelIndependent component analysis (FastICA, logcosh contrast, symmetric decorrelation) recovering k sources from the D mixed columns of XStatistics & ML
idctReturns a length-N real vectorSignal processing
identityThe n×n identity matrix (ones on the diagonal, zeros elsewhere)Core maths
idftReturns a length-N CVec. Inverse of dft, same O(n²) direct implementationSignal processing
idwtReturns a length-2N real vector, reconstructing the original signalSignal processing
ifftInverse DFT, same underlying kernel as fft run in reverseSignal processing
imImaginary component of a Complex/CVec/CMat (0 elementwise when x is real)Core maths
imadjustMATLAB-style contrast stretch, applied identically and independently to each of R/G/BImages
imagImaginary component of a Complex/CVec/CMat (0 elementwise when x is real)Core maths
image_from_matrixBuilds 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_newCreates a blank solid-color canvasImages
imagescFalse-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
imbothatBottom-hat: imclose(img, radius) - img, extracts small dark features / corrects a slowly-varying dark backgroundImages
imcloseMorphological closing (dilate then erode) — fills small background holes without enlarging the overall shapeImages
imdilatePerforms binary morphological dilation, growing foreground regionsImages
imequalizeHistogram equalisation, spreading the intensities to fill the range (identical operation to histeq above)Images
imerodeBinary morphological erosion — shrinks foreground regions and removes specks smaller than the elementImages
imfilterGeneric 2-D convolution with edge-clamped borders — the escape hatch when blur/sharpen/edge_detect's fixed kernels aren't enoughImages
imhistComputes raw per-bin BT.601-luma intensity countsImages
imnoiseFor "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 unitsImages
imopenMorphological opening (erode then dilate) — removes specks smaller than the structuring element while leaving larger shapes their sizeImages
impedanceReturns 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_reflectionReturns z = z0(1 + Γ)/(1 - Γ), the exact inverseSignal processing
impulseReturns 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
imputeReplaces 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
impzReturns the impulse response as a length-n real vectorSignal processing
imrotateRotates an image about its own centerImages
imscaleImplemented as imwarp + affine_scaleImages
imshowPlaces it inline in the current plot panel as a native SVG <image> element at its own resolutionImages
imtophatThe image minus its opening: what the opening removedImages
imtranslateImplemented as imwarp + affine_translateImages
imwarpApplies M to img in one resampling pass via inverse mappingImages
inchLength 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
indexReturns a Table: t with its row index set to that column, so rows can afterwards be looked up by labelCollections & strings
index_ofReturns a number (0-based character position of the first occurrence) or none if sub is absentCollections & strings
indexofReturns a number (0-based index of the first match) or Nothing if absent (composes with ??: indexof(xs, v) ?? -1)Collections & strings
inductorjwLSignal processing
inputStarts the pipeline sugar: n (a positive integer) is the number of input featuresStatistics & ML
insertReturns a new Str; s itself is untouchedCollections & strings
insert_columnReturns a NEW Table; the original is untouchedCollections & strings
insert_rowInserts one row into a table at a chosen positionCollections & strings
integral2Adaptive double integral of f(x, y) over the region xa <= x <= xb, ya(x) <= y <= yb(x)Signal processing
interp11-D interpolation through (x, y) (MATLAB's interp1)Signal processing
interp22-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_atA 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 ySignal processing
interpolate_nanExactly 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 nameNoise
invTrue inverse of A (a square Mat or CMat); requires full rank, errors otherwiseCore maths
inverse_transformUndoes a fitted scaler Record scaler's transform on an already-scaled matrix/vector/table newX, returning it to the original unitsStatistics & ML
invhilbThe exact inverse of hilb(n)Core maths
iqrInterquartile range: percentile(x,75) - percentile(x,25) — a spread measure robust to outliers, unlike std/varCore maths
irfftInverse 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_clippedReturns a Bool: does x contain a flat run at an extremeSignal processing
is_emptyWhether 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 elementCore maths
is_fullWhether 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 elementCore maths
is_stableReturns a boolean, true iff every pole lies strictly inside the unit circle — the standard causal-LTI stability criterionSignal processing
isbandedtrue 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
isdiagtrue when every entry off the main diagonal is exactly 0 (any shape; an all-zero matrix is diagonal)Core maths
isfiniteA 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
isinfA 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
isnanA 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_forestAnomaly 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
isposdeftrue when A is symmetric and positive definite, that is when the Cholesky factorisation succeedsCore maths
isprimeWhether the integer n is prime: a Bool for a number, a Mask for a Vec of integersCore maths
issymmetrictrue when A equals its transposeCore maths
istriltrue when A is lower triangular: every entry above the main diagonal is exactly 0 (any shape; diagonal matrices qualify)Core maths
istriutrue when A is upper triangular: every entry below the main diagonal is exactly 0 (any shape; diagonal matrices qualify)Core maths
itemsReturns a List: its keys (keys), its values (values), or (key, value) tuples (items) — insertion order, not sortedCollections & strings

J

jacobianTakes 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
joinTwo unrelated forms selected by the argument's typeConcurrency
js_execRuns code (string, source in the guest language) as a subprocessFile I/O
json2csvstr (string, JSON text) is converted to CSV text: exactly csvify(parse_json(str)). Returns a stringFile I/O
json2xmlstr (string, JSON text) is converted to XML: exactly xmlify(parse_json(str)). Returns a stringFile I/O
jsonifyConverts 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_foldSplits an N-row feature matrix X and a length-N target vector y into an integer number of folds cross-validation foldsStatistics & ML
kaiserReturns a length-n real vector, w[i] = I0(beta*sqrt(1-((2i/(n-1))-1)^2)) / I0(beta)Signal processing
kaiserordReturns 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_initInitial linear-Kalman state: x0 a length-D initial state estimate vector, P0 a (D, D) initial covariance matrixStatistics & ML
kapur_thresholdSame "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 betterImages
keysReturns a List: its keys (keys), its values (values), or (key, value) tuples (items) — insertion order, not sortedCollections & strings
kmeansLloyd'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_centersThe same Lloyd's-algorithm run as kmeans on X/k/seed=, returning the (k, D) centroid matrix instead of the labelsStatistics & ML
kmeans_modelk-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_modelThe outlier-resistant sibling of kmeans_model, same X/k/seed= shape: clusters by L1 distance around coordinate-wise median centres instead of meansStatistics & ML
kmedoids_modelPAM 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 averageStatistics & ML
knn_modelk-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
kronKronecker product: every A[i,j] replaced by the block A[i,j]·B, so an m×n and a p×q input give mp×nqCore maths
kurtosisFourth standardized moment, population form, of a length-N numeric vector xStatistics & ML

L

labBuilds 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_blobsConnected-component labelling: every separate region gets its own integer (identical operation to bwlabel above)Images
label_decodeThe inverse of label_encode: the classes entry at each 0-based code, a Vec when classes is numeric and a list when it holds stringsStatistics & ML
label_encodeReplaces each label by the 0-based index of its class in sorted class orderStatistics & ML
lastReturns the first (first) or last (last) element (same element type as xs holds), or none when xs is emptyCollections & strings
last_index_ofReturns 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 positionCollections & strings
layer_normNormalizes 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
lcaseBASIC's names for upper/lower; toupper/tolower are C's names for the same thingCollections & strings
lcmLeast common multiple of two integers, non-negative (0 if either is 0); same argument shapes as gcdCore maths
lda_modelLinear 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_curveHow a model's score changes with the amount of training dataStatistics & ML
least_squaresNonlinear least squares on a residual function you named, via Levenberg-MarquardtCore maths
leftThe first n characters of a stringCollections & strings
legendShows or hides the key for the current panelPlotting
legendreAssociated Legendre functions P_n^m(x) for m = 0..n, unnormalised and with the Condon-Shortley phase (-1)^m, as MATLABCore maths
lenReturns a number: the current element count (via the same generic length dispatch every collection uses)Collections & strings
lengthTotal 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
lfilterReturns a same-length vector or SignalSignal processing
lgammaThe gamma function (gamma(n) = (n-1)! for a positive integer n) and its natural log (lgamma(x) = ln|gamma(x)|)Core maths
likeBASIC's wildcard match, anchored at both ends: * any run, ? any one character, # any digit, [abc]/[!abc] a setCollections & strings
lineBuilds a line-segment structuring-element mask Image by Bresenham-rasterizing a length-pixel segment centered on its own middle pixelImages
linesSplits on either line ending, with no spurious empty last element when the text ends in a newlineCollections & strings
linked_listReturns a linked_list handle: a new, empty double-ended listCollections & strings
linprogLinear programming: minimises c'x subject to A x <= b, Aeq x = beq and lb <= x <= ubSignal processing
linspaceReturns 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_dirThe bare names inside path (a Str), sorted — "a.qu", not "tools/a.qu"File I/O
list_filesEvery 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 entryFile I/O
listdirThe bare names inside path (a Str), sorted — "a.qu", not "tools/a.qu"File I/O
listen_poolBinds port and blocks forever (this call never returns under normal operation), accepting job requests over TCP and running only functions named in allowConcurrency
llm_loadLoads 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 itStatistics & ML
lms_initThe least-mean-squares (LMS) adaptive FIR filter's initial stateSignal processing
lnNatural logarithm, elementwise (log is an alias for ln — it is not base-10; see log10 for that)Core maths
loadRestores every variable a save/save_all call wroteFile I/O
load_imageReads the file from disk and decodes it — PNG, BMP, JPEG and TIFFImages
load_libraryLoads a native shared library (.dll on Windows, .so on Linux, .dylib on macOS) so its C functions can be called with native_callFile I/O
load_modelReads a model previously written by save_model back from the HDF5 file at the string pathStatistics & ML
load_svgReads 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
logNatural logarithm, elementwise (log is an alias for ln — it is not base-10; see log10 for that)Core maths
log10Base-10 / base-2 logarithm, elementwise, same domain behavior as ln on a non-positive elementCore maths
log1pln(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
log2Base-10 / base-2 logarithm, elementwise, same domain behavior as ln on a non-positive elementCore maths
logistic_modelBinary logistic regression on an N-row, D-column X and a length-N 0/1 target yStatistics & ML
loglogPlots equal-length numeric Vecs x, y like plot and additionally sets both axes to log scalePlotting
logmPrincipal matrix logarithm of a dense real square matrix, the inverse of expm: expm(logm(A)) = ACore maths
logncdfCumulative log-normal distribution P(X <= x)Statistics & ML
lognfitMaximum-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
logninvInverse of logncdf: the x with logncdf(x) = p, for p in [0, 1] (outside is an error)Statistics & ML
lognpdfProbability density of the log-normal distribution at x (a number, vector or matrix, elementwise)Statistics & ML
lognrndRandom draws from the log-normal distributionStatistics & ML
lognstatMean and variance of the log-normal distribution with these parameters, as a result with fields .mean and .varStatistics & ML
logspaceReturns 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 gridSignal processing
logsumexpNumerically stable log(sum(exp(x))), via the usual max-shift so a large input can't overflow expCore maths
low_timeReturns 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 otherwiseSignal processing
lowerUnicode-aware lowercase conversionCollections & strings
lr_adaptiveLearning-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_plateauLearning-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
lseNumerically stable log(sum(exp(x))), via the usual max-shift so a large input can't overflow expCore maths
lstm_cellOne 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_forwardUnrolls 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_initBuilds 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
lstsqMinimum-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_bodeReturns a record {w, mag_db, phase_deg}: magnitude in dB and phase in degrees at each frequencySignal processing
lti_c2dReturns the discrete system with sample time dt that corresponds to the continuous sys, in state-space formSignal processing
lti_d2cReturns the continuous system that lti_c2d with the same method would turn into the discrete sys, in state-space formSignal processing
lti_dcgainReturns 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 otherwiseSignal processing
lti_feedbackReturns 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_freqrespReturns 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_impulseReturns a record {t, y, x}: the response from rest to an impulse at t = 0, with the arguments of lti_stepSignal processing
lti_is_stableReturns true when every pole is strictly inside the stable region: real part below 0 for a continuous system, magnitude below 1 for a discrete oneSignal processing
lti_lsimReturns a record {t, y, x}: the response to the input u sampled at times t, starting from state x0Signal processing
lti_marginReturns a record {gm, gm_db, pm, w_gm, w_pm, stable} for the loop transfer function sys closed with unity negative feedbackSignal processing
lti_parallelReturns the sum of two systems driven by the same input (a + b) as an "lti" model in state-space formSignal processing
lti_polesReturns 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_zpkSignal processing
lti_seriesReturns the cascade u -> a -> b -> y as an "lti" model in state-space form (the transfer function b * a)Signal processing
lti_ssReturns 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" modelSignal processing
lti_stepReturns a record {t, y, x}: the response from rest to a unit step applied at t = 0Signal processing
lti_tfReturns the single-input single-output system with transfer function num(s)/den(s) (or num(z)/den(z) when dt > 0) as an "lti" modelSignal processing
lti_to_ssReturns the same system with form = "ss": only the realization A, B, C, D, dt is keptSignal processing
lti_to_tfReturns the same system with form = "tf" and fields num, den (highest power first)Signal processing
lti_to_zpkReturns the same system with form = "zpk" and fields z, p (complex vectors) and kSignal processing
lti_zerosReturns the zeros of the transfer function as a complex vector (empty when there are none)Signal processing
lti_zpkReturns the single-input single-output system k * prod(s - z_i) / prod(s - p_i) as an "lti" modelSignal processing
ltrimSame parameters as trim, restricted to one end only (ltrim the left, rtrim the right)Collections & strings
luLU decomposition with partial pivoting of a square n×n Mat A, P·A = L·UCore maths
lyapSolves the continuous Lyapunov equation A X + X A' + Q = 0 for X, with A and Q real n×nCore maths

M

maeThe 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
mag2dbReturns the same shape: 20*log10(x)Signal processing
magnitudeAn exact alias of abs — the same match arm, so the two names cannot drift apartSignal processing
make_fileCreates an empty file at path (a Str), truncating it if it is already there — the same promise fopen(path, "w") makes, so the two agreeFile I/O
mapReturns a List: f applied to every elementCollections & strings
markersAdded in v0.2.4. The signal's markers as a list of records with time and label, in time orderSignal processing
markov_chainBuilds 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_execThe 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
matmulMatrix multiplication of A (r×k) and B (k×c), both Mat (inner dimensions must agree)Core maths
maxIn 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 scalarCore maths
maximumElementwise larger/smaller of two arguments — exactly max(a, b) / min(a, b) (which already worked elementwise), under the names NumPy users typeCore maths
maxpool2dDownsamples 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
md2htmlConverts headings, paragraphs, lists, fenced code with its language, blockquotes, pipe tables, rules, and inline code/bold/italic/links/imagesCollections & strings
meanArithmetic mean of every element of x — a scalar, Vec, or Mat/SignalCore maths
measure_snrComputes the achieved signal-to-noise ratio by treating noisy - clean as the noiseNoise
medfiltReplaces each sample by the median of window samples centred on itNoise
medfilt2Synonyms for medfilt at the Qu level: x is a length-N number vector or an Image, window an optional positional/named odd integer, default 3Noise
medianMiddle 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 evenCore maths
median_filterSynonyms for medfilt at the Qu level: x is a length-N number vector or an Image, window an optional positional/named odd integer, default 3Noise
mel_spectrogramMel-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_usageReturns 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
meshgridThe two coordinate matrices a surface or contour needs, from two axis vectors x (length nx) and y (length ny)Core maths
metadataAdded in v0.2.4. Returns a Record of the signal's metadataSignal processing
midPlain aliases of the same implementation (mid exists purely for BASIC/Excel discoverability)Collections & strings
minIn 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 scalarCore maths
minimizeReturns a Model (kind "minimize") with fields params (length-P vector), value (a number), converged (a boolean)Signal processing
minimumElementwise larger/smaller of two arguments — exactly max(a, b) / min(a, b) (which already worked elementwise), under the names NumPy users typeCore maths
minutely_profileReturns a length-60 real vectorSignal processing
mirrorReverses row order (flipud, dim=1) or column order (fliplr/mirror, dim=2) of A, a Str, Vec, Mat, or ImageCore maths
mismatch_lossReturns -10 log10(1 - |Γ|²) in dB: the incident power not delivered to the loadSignal processing
mkdirCreates the directory path (a Str), including any missing parents — mkdir -p, not bare mkdirFile I/O
mlp_classifierShortcut 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
mmLength 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_lenReports the mapped file's sizeFile I/O
mmap_openMemory-maps path (string, filesystem path) read-onlyFile I/O
mmap_readReads a byte range out of a mapping without moving any cursorFile I/O
modReturns a number: the remainder with the sign of the divisor, so -1 mod 3 is 2 rather than -1Collections & strings
modeThe most frequent value in a numeric or categorical vector x of length NStatistics & ML
monte_carloReturns a length-n vector collecting every resultSignal processing
monthly_profileReturns a length-12 real vector, one bin per equal-width twelfth of a Julian yearSignal processing
moveExactly 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_fileMoves 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
mseThe 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
mtimesMatrix multiplication of A (r×k) and B (k×c), both Mat (inner dimensions must agree)Core maths
mulThe operators as named functions, so an operation can be passed where a name is what you can passCore maths
multi_head_attentionRuns 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_otsuThe n_classes - 1-threshold generalization of otsu_thresholdImages
multisineReturns a length-n Signal. Sum of cosines at the given frequencies/amplitudesSignal processing
multithresholdQuantizes into len(levels)+1 bands at the given cut pointsImages
mutexCreates a shared mutable cell holding initial (any value, of any type — the mutex has no fixed element type)Concurrency
mutex_addAtomic read-modify-write in a single lock acquisition (unlike mutex_set(m, mutex_get(m) + delta), which would race)Concurrency
mutex_getReads the current value out of mutex handle mConcurrency
mutex_setOverwrites 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 involvedConcurrency
mutex_updateAtomic 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_classifk-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
mvnpdfMultivariate 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

nadamThe 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_modelGaussian 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
nandReturns a bool: logical NANDCollections & strings
native_callCalls 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 typesFile I/O
nbincdfCumulative negative binomial distribution P(X <= k), a step function of floor(k)Statistics & ML
nbinfitMaximum-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
nbininvInverse 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
nbinpdfProbability mass of the negative binomial distribution at k (a number, vector or matrix, elementwise); zero at a non-integer or out-of-support kStatistics & ML
nbinrndRandom draws from the negative binomial distributionStatistics & ML
nbinstatMean and variance of the negative binomial distribution with these parameters, as a result with fields .mean and .varStatistics & ML
nchoosekThe binomial coefficient n choose k for non-negative integers, computed exactlyCore maths
ncolReturns a number: the column countCollections & strings
neighborshas_edge(g, a, b) returns a bool; neighbors(g, name) returns a List of Str node idsCollections & strings
nesterov_sgdPlain 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
newtonReturns a single number, the rootSignal processing
nmfNon-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
nnlsNon-negative least squares by Lawson-Hanson, for when a negative coefficient would be physically meaningless — a concentration, a mass, a relaxation strengthCore maths
nnzNumber 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
norReturns a bool: logical NORCollections & strings
normEuclidean (L2) norm; for a matrix this is the Frobenius norm (every element treated as one long vector), not a matrix operator normCore maths
normalDraws 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
normalizeMin-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
normcdfNormal cumulative distribution P(X <= x) at x (a number, vector or matrix, elementwise), mean mu, standard deviation sigma (positive)Statistics & ML
normfitMaximum-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
norminvInverse 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/infStatistics & ML
normpdfGaussian probability density at x (a number or vector, elementwise) with mean mu (default 0) and standard deviation sigma (default 1)Statistics & ML
normrndRandom draws from the normal distributionStatistics & ML
normstatMean and variance of the normal distribution with these parameters, as a result with fields .mean and .varStatistics & ML
notchReturns a Model (kind "filter", field sos, one section)Signal processing
nowReturns 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
nrowReturns a number: the row countCollections & strings
nullOrthonormal 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 roundingCore maths
numelTotal 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
nyquistThe 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

ode23Bogacki-Shampine 3(2), the cheaper low-order pair: better than ode45 at loose tolerances or when f is not smoothSignal processing
ode45Dormand-Prince 5(4) with adaptive step size and the 4th-order continuous extension, for non-stiff problemsSignal processing
ode_stiffStiff 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_modelFits ordinary least squares with an automatic intercept on an N-row, D-column feature matrix X and a length-N target vector yStatistics & ML
one_hotOne-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
onesA vector or matrix of ones, with the same one-argument-vs-two-argument shape rules as zeros aboveCore maths
ones_likeA 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 itCore maths
optimizer_stepOne 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
orReturns 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 guardCollections & strings
ordReturns a one-character Str from chr, and a number — the code point — from ordCollections & strings
orthOrthonormal 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 MatCore maths
otsuCompute-and-apply convenience: otsu_threshold followed immediately by threshold in one callImages
otsu_thresholdComputes (does not apply) the classic Otsu optimal threshold from x's histogram (Image reads per-pixel luma; Vec/Signal read their own values)Images
outerOuter product u·vᵀ: a len(u)×len(v) Mat of u[i]·v[j], whatever the orientation of the two vectorsCore maths
overshootReturns 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

packReturns a byte buffer, a Vec of integers in 0..=255Collections & strings
pad_leftPads on the left to width characters; a string already that wide is returned unchanged, never truncatedCollections & strings
pad_rightSame parameters and return as pad_left, padding on the right insteadCollections & strings
paletteGenerates n (integer) categorical colours of equal perceptual weight by walking hue at fixed saturation/valuePlotting
panelSelects cell k (integer, 1-based, row-major) of a rows-by-cols (integers) grid as the target for further drawingPlotting
parallelTwo or more circuits in parallel; admittances addSignal processing
paramWraps 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_asscanf backwards: "hello world 12".parse_as("hello world %d") gives 12Collections & strings
parse_csvConverts 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_jsonjsonify'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_xmlxmlify's inverse. str (string) is XML text in xmlify's own element-naming conventionFile I/O
particle_filterThe 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_initGeneric 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
pauseFreezes the count, keeping the accumulated total so start resumes from where it left offREPL & diagnostics
pcaProjects an N-row, D-column matrix X onto its top k principal components (columns mean-centered first)Statistics & ML
pca_componentsFits 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 spaceStatistics & ML
pca_explained_varianceFits 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 orderStatistics & ML
pca_modelPCA 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
peakmax(abs(x)) over every element of x — a scalar, Vec, or Mat/Signal, flattenedCore maths
peekOn 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 removingCollections & strings
peek_byteLooks at the next raw byte of f (file handle, opened readable) without consuming itFile I/O
peek_charLooks at the next character of f (file handle, opened readable) without consuming itFile I/O
peek_lineLooks at the next line of f (file handle, opened readable) without consuming itFile I/O
percentileSame computation as quantile, with p on a 0..100 scale instead of 0..1 (p=50 is the median)Core maths
periodic_profileReturns a length-n_bins real vector, one summary statistic per binSignal processing
periodogramReturns 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_importanceShuffles 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
phaseComplex 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_initA discrete PID controller's initial stateSignal processing
pieOrdinary pie chart — same call shape as donut (values a Vec of numbers, trailing strings optional slice labels) with donut=falsePlotting
pinvMoore-Penrose pseudo-inverse (SVD-based) of A, an r×c Mat or CMatCore maths
pipelineComposes 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
plotDraws a basic line (or, with a positional or marker= marker string such as "o", a scatter-style) plot of y versus xPlotting
pls_modelPartial 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
pmapReturns a List: f applied to every elementCollections & strings
pointMarks a single position (x, y) (numbers, data units) with a dotPlotting
poisscdfCumulative Poisson distribution P(X <= k), a step function of floor(k)Statistics & ML
poissfitMaximum-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
poissinvInverse 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
poissonExact 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
poisspdfProbability mass of the Poisson distribution at k (a number, vector or matrix, elementwise); zero at a non-integer or out-of-support kStatistics & ML
poissrndRandom draws from the Poisson distributionStatistics & ML
poisstatMean and variance of the Poisson distribution with these parameters, as a result with fields .mean and .varStatistics & ML
polarplotConverts 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 seriesPlotting
polesReturns a complex vector (CVec), one entry per pole across all sections/tapsSignal processing
polyCoefficients (highest power first, leading 1) of the monic polynomial with the roots r, a Vec, CVec or scalar; poly([]) is [1]Statistics & ML
polyderDerivative 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 constantStatistics & ML
polyfitFits a least-squares polynomial of the given integer degree to a length-N vector x and a length-N vector yStatistics & ML
polygonDraws a closed shape connecting the points (xs[i], ys[i]) in order and back to the firstPlotting
polyintAntiderivative 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
polyvalEvaluates 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 methodStatistics & ML
poolReturns a Pool handle, unregistered and scoped to wherever it's usedConcurrency
popOn 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 removingCollections & strings
pop_backRemoves and returns the element from the front (pop_front) or back (pop_back) in O(1)Collections & strings
pop_frontRemoves and returns the element from the front (pop_front) or back (pop_back) in O(1)Collections & strings
poroussqrt(Rp Zi)/tanh(sqrt(Rp/Zi)), Zi = 1/(Q (jw)^n) — de Levie porous electrodeSignal processing
powThe operators as named functions, so an operation can be passed where a name is what you can passCore maths
pow2dbReturns the same shape: 10*log10(x)Signal processing
pr_curvePrecision-recall curve of score against 0/1 labels actualStatistics & ML
precisionClassification 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
predictApplies a fitted model Record model to a new M-row (same D columns as it was fitted on) matrix or vector XnewStatistics & ML
primesAll primes <= n as an ascending Vec, by a sieve of Eratosthenes; n < 2 gives an empty VecCore maths
printWrites its arguments, space-separated, and a newline, to stdoutCollections & strings
printtexSame conversion as tex(x) on value x (number, Vec, Mat, or complex), but prints it directly instead of returning a stringPlotting
processReturns the processed signal, applying p's function block by block and carrying state across the block boundariesSignal processing
processorReturns a Model (kind "processor") with fields fn, block, latency (samples), stateful, plus state when stateful and rate/latency_ms when a rate was givenSignal processing
prodProduct of every element of x — a scalar, Vec, or Mat/Signal, real only (unlike sum, does not accept a CVec/CMat)Core maths
profile_endCloses 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_startStarts 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_endREPL & diagnostics
profile_statsprofiling_mode takes one argument, a boolean (true to start recording, false to stop), and returns noneREPL & diagnostics
profiling_modeprofiling_mode takes one argument, a boolean (true to start recording, false to stop), and returns noneREPL & diagnostics
progressA tqdm-style progress bar, called once per loop iteration: i is the 0-based index (0 through n - 1), n is the total countREPL & diagnostics
properUppercases every word's first character, lowercases the rest — VB's StrConv(s, vbProperCase)Collections & strings
psdReturns 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
ptLength 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_frequencyReturns 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_periodReturns 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_widthReturns a single number: the mean width of the complete pulses, in seconds for a Signal and samples otherwiseSignal processing
pump_watchesChecks 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
pushOn 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 removingCollections & strings
push_backGrows l at the back (push_back) or front (push_front) in O(1)Collections & strings
push_frontGrows l at the back (push_back) or front (push_front) in O(1)Collections & strings
pwdcur_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 scriptsFile I/O
pwlContinuous piecewise-linear least-squares fit through equal-length numeric Vecs x, yPlotting
pwmNatural-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_execRuns code (string, source in the guest language) as a subprocessFile I/O
pzplotPole-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 verdictSignal processing

Q

q_learningTabular 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_demodulateNearest-constellation-point decision, the exact inverse of qam_modulate on clean symbolsSignal processing
qam_modulateMaps 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 oneSignal processing
qda_modelQuadratic discriminant analysis: like lda_model but each class has its own covariance, so the boundaries are quadraticStatistics & ML
qrThin QR decomposition of A (r×c Mat), A = Q·RCore maths
quadAdaptive Gauss-Kronrod (G7K15, QUADPACK's rule and error scaling) integral of f(x) over [a, b]; f takes and returns a numberSignal processing
quad_infoquad 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
quadprogConvex 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
quantileLinear-interpolation quantile (NumPy's default interpolation="linear" method)Core maths
quantile_normalizeRank-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
queueCreates an empty deferred-job listConcurrency
quick_mlpFits 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

raincloudAllen 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
randDraws from the uniform distribution on [0, 1)Statistics & ML
randiDraws 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
randnDraws from the standard normal distribution (mean 0, std 1), same rows/cols/seed= shape as randStatistics & ML
random_forest_modelBagged 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_walkGenerates 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
rangeInclusive 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_decodeInverse of range_encode: enc is the Record that call returned; as_str (named boolean, default false) asks for text instead of bytesFile I/O
range_encodeByte-oriented adaptive range coding of data (a Str, or a Vec of 0-255 byte values)File I/O
rankNumerical rank of A (an r×c Mat or CMat) — the count of singular values clearing the toleranceCore maths
rans_decodeInverse of rans_encode: enc is the Record that call returned; as_str (named boolean, default false) asks for text instead of bytesFile I/O
rans_encoderANS 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 payloadFile I/O
rcondReciprocal 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
reReal component of a Complex/CVec/CMat (identity — x passed through unchanged — when x is already real)Core maths
readswap atomically exchanges front and back (returns Nothing); read returns the stable front valueCollections & strings
read_allReads every remaining byte from f (file handle, opened readable)File I/O
read_all_textReads path (string) in full. Returns the whole file's content as one stringFile I/O
read_arrayReads a whole binary file as one typed array, without an explicit fopenFile I/O
read_binReads up to n (a number) raw bytes from f (file handle, opened readable)File I/O
read_bitReads 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 consumedFile I/O
read_byteReads one raw byte from f (file handle, opened readable)File I/O
read_bytesBlocks up to the handle's timeout_ms, returning a Vec of 0-255 integer values — possibly fewer than n if the timeout elapses firstConcurrency
read_charReads one character from f (file handle, opened readable), UTF-8 awareFile I/O
read_charsReads exactly n (number, count of Unicode characters, UTF-8 aware) characters from f (file handle, opened readable)File I/O
read_csvReads a CSV file into a TableFile I/O
read_doubleReads a 64-bit IEEE-754 float from f (file handle, opened readable)File I/O
read_floatReads a 32-bit IEEE-754 float from f (file handle, opened readable)File I/O
read_inputReads one line of interactive input, returned as a string with its trailing newline strippedFile I/O
read_intThe 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_int16Reads a signed 16-bit integer from f (file handle, opened readable)File I/O
read_int32Reads a signed 32-bit integer from f (file handle, opened readable)File I/O
read_int64Reads a signed 64-bit integer from f (file handle, opened readable)File I/O
read_lineReads one line from f (file handle, opened readable)File I/O
read_matReads a MATLAB .mat file (via the matfile crate) without needing a MATLAB installationFile I/O
read_npyReads a NumPy .npy file (format versions 1-3, little- or big-endian, C or Fortran order) without NumPyFile I/O
read_npzReads 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 doesFile I/O
read_structReads one fixed-width binary record from f (file handle, opened readable)File I/O
read_structsReads up to n (number) fixed-width binary records from f (file handle, opened readable), using the same fields layout read_struct takesFile I/O
read_uint16Reads an unsigned 16-bit integer from f (file handle, opened readable)File I/O
read_uint32Reads an unsigned 32-bit integer from f (file handle, opened readable)File I/O
read_uint64Reads an unsigned 64-bit integer from f (file handle, opened readable)File I/O
read_untilReads from f (file handle, opened readable) up to and including the next occurrence of delimiter (string), consuming itFile I/O
read_valuesReads n (number, count) typed values from an already-open handleFile I/O
read_versionThe content of one saved version of path as a StrFile I/O
realReal component of a Complex/CVec/CMat (identity — x passed through unchanged — when x is already real)Core maths
recallClassification 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
rectDraws an axis-aligned rectanglePlotting
rectangleDraws an axis-aligned rectanglePlotting
reduceReturns the final accumulated value (whatever type f produces)Collections & strings
reflection_coefficientReturns Γ = (z - z0)/(z + z0), complexSignal processing
regex_countReturns a number: how many non-overlapping matches occurCollections & strings
regex_findReturns a Str (the first match) or none — not an empty string, so "matched empty" and "did not match" stay apartCollections & strings
regex_find_allReturns a List of Str — every match, in orderCollections & strings
regex_groupsReturns a List of Str — the capture groups of the first match, group 1 onward; a group that did not participate is an empty stringCollections & strings
regex_matchReturns a bool: whether the pattern occurs anywhere in sCollections & strings
regex_replaceReplaces every match of the regular expression pattern in s with replCollections & strings
regex_splitReturns a List of Str, split on every match of the patternCollections & strings
regionpropsTakes 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
regionsAdded in v0.2.4. The signal's regions as a list of records with start, end and label, in start orderSignal processing
reluElementwise 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
remRemainder with the sign of the dividend (MATLAB rem, C fmod): rem(-7, 3) is -1, rem(7, -3) is 1Core maths
remezReturns the Parks-McClellan equiripple linear-phase FIR filter as a Model (kind "filter", field b), like fir1Signal processing
removeTwo 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_dirDeletes the directory path, to the Recycle Bin/Trash by default and outright with permanent=true, as remove_fileFile I/O
remove_fileDeletes 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_nanx with the missing samples droppedNoise
remove_noisex 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_outliersThe same criterion, with the flagged samples droppedNoise
remove_small_blobsDrop connected components below that area, after labelling internally (identical operation to bwareaopen above)Images
rename_fileRenames old to new (both Str), generally within the same filesystemFile I/O
repeat_strs * n is the shorter spelling for the same thing; the function is not called repeat because that is a loop keywordCollections & strings
replaceEvery literal (non-regex) occurrence of old in s is replaced by newCollections & strings
replace_outliersThe same criterion, with the flagged samples patched in placeNoise
repmatTiles A m times down and n times across: repmat([1, 2; 3, 4], 2, 3) is 4×6Core maths
resample_intRational rate change by L/M in a single pass: zero-stuff by L, filter once, decimate by MSignal processing
resample_toReturns 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
resetReturns the environment env's starting state — a plain integer state indexStatistics & ML
reshapeReinterprets a value as a matrix of a given shapeCore maths
resistorRSignal processing
resizeReturns a new Image of exactly width x height pixelsImages
restartReturns 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_versionWrites that version back to path, first keeping the current content as a new version, so a restore can itself be undoneFile I/O
return_lossReturns -20 log10 |Γ| in dB, positive for a passive load — the engineering convention in which "20 dB return loss" means well matchedSignal processing
reverseUnicode-aware character reversal for a Str (same type back); element-order reversal for a List/Vec/Mask (same type and shape back)Collections & strings
rewindResets f's (file handle, opened readable) read cursor to the beginning — exactly seek(f, 0)File I/O
rfeRecursive 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 refitsStatistics & ML
rfftReal-optimized half-spectrum FFTSignal processing
rgbBuilds a colour from channel numbers: r, g, b (and, for rgba, a fourth channel a)Plotting
rgbaBuilds a colour from channel numbers: r, g, b (and, for rgba, a fourth channel a)Plotting
ridgeTikhonov-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_modelThe 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
rightThe last n characters of a stringCollections & strings
rise_timeReturns a single number: the transition time of the first complete rising (respSignal processing
rising_edgesReturns 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
rk4Classical 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 reportedSignal processing
rlkk_extrapolateReturns a single length-M CVec, not a modelSignal processing
rlkk_reconstructReturns 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_validateReturns 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
rmsRoot-mean-square, sqrt(mean(x.^2)), of every element of x — a scalar, Vec, or Mat/Signal, flattenedCore maths
rmseThe 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
rmspropPer-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_scaleOutlier-resistant scaling of X (vector, matrix column-wise, or table per numeric column): (x - median) / IQRStatistics & ML
roc_curveROC curve of any real-valued score against 0/1 labels actualStatistics & ML
rolling_maxMaximum over a centred window. Same shape/type rules as rolling_meanNoise
rolling_meanMean over a window centred on each sampleNoise
rolling_minMinimum over a centred window. Same shape/type rules as rolling_meanNoise
rolling_rmsRoot-mean-square over a centred window — a moving level, e.g. for an RMS trigger thresholdNoise
rolling_stdSample (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 checkNoise
rootsRoots 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 matrixStatistics & ML
rot90Rotates 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 4Core maths
roundStandard rounding functions, elementwise: floor toward negative infinity, ceil toward positive infinity, round to the nearest integer (half away from zero)Core maths
row_meanCollapses 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_sumCollapses 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
rowsRow / 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 NumCore maths
rtrimSame parameters as trim, restricted to one end only (ltrim the left, rtrim the right)Collections & strings
run_forDrives every registered every/after/at timer across a simulated virtual timeline, not a real wall-clock sleepConcurrency
run_for_statsReports 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_modeRefuses file and network access for the rest of the session and returns noneREPL & diagnostics
sarsaTabular 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_thresholdSauvola'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
saveWrites 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 typeFile I/O
save_allSaves 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_imageEncodes 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_modelWrites 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_svgWrites 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
savefigExports the current figure to path (string, a filesystem path); format is chosen by the file extensionPlotting
savgolSavitzky-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 flattenNoise
sawtoothEach generates one period-repeating waveform: freq (number, Hz), fs (number, sample rate in Hz), n (integer, sample count) are all scalars, in that orderPlotting
scaled_dot_product_attentionCore 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
scanscanf backwards: "hello world 12".parse_as("hello world %d") gives 12Collections & strings
scatterSame machinery as plot — x, y are equal-length Vecs of numbers — but defaults its marker to "o" (dots) instead of "line"Plotting
scatterfitDraws a scatter of equal-length numeric Vecs x, y plus a polyfit trend linePlotting
schurReal 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
sciReturns 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
scoreScores a fitted model Record model against an N-row feature matrix X and, for a supervised kind, the matching length-N target vector yStatistics & ML
sechThe other three hyperbolics: coth(x) = cosh(x)/sinh(x), sech(x) = 1/cosh(x), csch(x) = 1/sinh(x)Core maths
seedReseeds the shared random stream with integer n, so subsequent calls to rand/randn/etcStatistics & ML
seekMoves f's (file handle, opened readable) read cursorFile I/O
selectReturns a Table containing only the named columns, in the order givenCollections & strings
semaphoreCreates a counting semaphore with n (integer, must be non-negative) initial permitsConcurrency
semaphore_acquireBlocks the calling thread until a permit is free on semaphore handle s, then takes it (decrementing the available count by one)Concurrency
semaphore_availableNon-blocking snapshot of how many permits are free right now on semaphore handle sConcurrency
semaphore_releaseReturns one permit to semaphore handle s (incrementing the available count by one)Concurrency
semilogxPlots equal-length numeric Vecs x, y like plot and additionally sets the x-axis to log scalePlotting
semilogyPlots equal-length numeric Vecs x, y like plot and additionally sets the y-axis to log scalePlotting
sequentialInitializes 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_splitThe 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 orderStatistics & ML
serial_openOpens a real OS serial port. port (string) is the OS device name, e.g. "COM3" on Windows or "/dev/ttyUSB0" on Linux/macOSConcurrency
serial_portsLists the short names of every serial device the OS currently reports (e.g. "COM3" on Windows, "/dev/ttyUSB0" on Linux/macOS)Concurrency
seriesTwo or more circuits in series; impedances addSignal processing
setget 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 ignoredCollections & strings
set_metadataAdded 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_timeAdded in v0.2.4. Dates the signal: sets the time of sample 0 in secondsSignal processing
sfdrWith 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
sgdPlain 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
shapeThe full shape of A as a 2-element Vec, [rows, cols], using the same per-type shape rules as rows/cols aboveCore maths
sharpenApplies a fixed 3x3 unsharp-mask sharpen kernelImages
shellHands command (a Str) to the OS shell and returns immediately, without waiting — Visual Basic's Shell, which is where the window styles come from tooFile I/O
shortest_pathReturns a number (the shortest total edge weight, via Dijkstra) or none if to is unreachable from from — disconnected is an answer, not an errorCollections & strings
sigma_deltaReturns a same-length vector or Signal (preserving x's Fs when it's a Signal), each sample +1/-1Signal processing
sigmoidElementwise 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
signThe 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
signalTags Vec x (numbers) with sample rate fs (number, Hz), so later calls (like rfft) do not have to be told it againPlotting
signal_slice_timeReturns a new Signal at the same FsSignal processing
signal_unitAdded in v0.2.4. With one argument, reads the sample unit (Nothing if unset)Signal processing
silhouettePer-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_scoreThe 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_cnnBuilds 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_classifierBuilds 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
simpsonComposite Simpson's rule on sampled data, with the same x/matrix conventions as trapzSignal processing
simulateDraws 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
sinStandard trigonometric functions, computed elementwiseCore maths
sinadWith 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_estimateReturns a single number: sinad_estimate in dB, enob_estimate in bitsSignal processing
sineReturns a length-n Signal (carries Fs=fs)Signal processing
sinhHyperbolic sine/cosine/tangent, elementwiseCore maths
sizeThe full shape of A as a 2-element Vec, [rows, cols], using the same per-type shape rules as rows/cols aboveCore maths
sizeofDeprecated — use shape. The same function under a name that means a byte count in every language it could have come fromCollections & strings
skewnessThird standardized moment, population form, of a length-N numeric vector xStatistics & ML
sleepPauses the calling thread for that long, first flushing printed outputConcurrency
smc_initA first-order sliding-mode controller's initial stateSignal processing
smithImpedance 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 arcsPlotting
smoothOne 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
smoothmaxSmooth (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
snrWith 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_barAggregates 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_boxOne 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_scatterSeaborn-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
softmaxElementwise exp(x_i) / sum(exp(x)) — the gradient of logsumexp, and a probability distribution that sums to 1Core maths
softmax_rowsSoftmax 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 exponentialStatistics & ML
solveSolves A·x = b for x by LU with partial pivoting (or, for a CMat/CVec A/b, by complex SVD least squares)Core maths
sortA list of strings sorts lexicographically, a numeric vector sorts numericallyCollections & strings
sort_byReturns a Table sorted by that one columnCollections & strings
sortpermThe 0-based indices that sort x, so x[sortperm(x)] is sortedCollections & strings
sosfiltReturns a same-length vector or Signal (keeping x's own Fs on the way out, when x is a Signal)Signal processing
spawnRuns an already-defined user function on rayon's global thread pool (the Worker abstraction)Concurrency
spectral_coherenceReturns 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_entropyReturns 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
spectrogramIf 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
spectrumReturns a spectrum of floor(N/2)+1 one-sided bins (DC to Nyquist)Signal processing
spectrum_atReturns the single complex bin nearest that physical frequency (round(freq/df), clamped to the available bins) — addressing the spectrum in Hz instead of by indexSignal processing
spectrum_normalizeReturns 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_unnormalizeReturns a new raw_transform-scaled spectrum — the exact inverse of spectrum_normalize/scaling=Signal processing
spiderplotRadar 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
splAdded 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-coupledSignal processing
splineplotNatural cubic spline through the control points (x[i], y[i]) (equal-length numeric Vecs), resampled onto 200 points for a smooth linePlotting
splits 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
sprintfC/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
sqrtElementwise 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
sqrtmPrincipal 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
squareA bipolar (±1) periodic pulse trainPlotting
stackbarStacked 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 barPlotting
stairStep (staircase) plot of equal-length numeric Vecs x, yPlotting
stampPlaces a transformed copy of a captured layer (the value capture returned) at position (x, y) (numbers, data units)Plotting
standardizez-score scaling of X (vector, matrix column-wise, or table per numeric column): (x - mean) / stdStatistics & ML
startBegins counting, or resumes from pauseREPL & diagnostics
start_timeAdded 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_withReturns a bool: true if s starts with prefixCollections & strings
stationaryComputes the long-run state distribution of a markov_chain chain by power iteration; converges for any irreducible, aperiodic chainStatistics & ML
stdSample standard deviation (N-1, unbiased, denominator) of every element of x — a scalar, Vec, or Mat/SignalCore maths
steReturns a vector of length num_frames, one energy value per frameSignal processing
steer_delaysThe 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
stemDiscrete 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
stepApplies one action (an integer 0-3) from the current integer state index in environment envStatistics & ML
step_infoReturns 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
stepzSame arguments and length rule as impzSignal processing
stftReturns 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 frameSignal processing
stopFreezes the timer and resets the count to zero (unlike pause, which keeps it); returns noneREPL & diagnostics
stop_gradReturns 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
strRenders x (any value/type) the same way print/disp wouldCollections & strings
stratified_splitThe 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
subplotSelects cell k (integer, 1-based, row-major) of a rows-by-cols (integers) grid as the target for further drawingPlotting
substrPlain aliases of the same implementation (mid exists purely for BASIC/Excel discoverability)Collections & strings
subtractThe operators as named functions, so an operation can be passed where a name is what you can passCore maths
sumSum 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
summaryThe 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
svdThin SVD of A (r×c Mat or CMat), A = U·diag(s)·VᵀCore maths
svdvalsThe 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_modelBinary-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_modelSupport-vector regression on an N-row, D-column X and a length-N numeric target yStatistics & ML
swapswap atomically exchanges front and back (returns Nothing); read returns the stable front valueCollections & strings
swap_endianReverses the byte order within each width-byte chunk (big-endian u32s become little-endian and back), unlike reverse_bytes, which reverses the whole bufferCollections & strings
sweepGenerates a linear (or, with method="logarithmic", log) frequency sweep from f0 to f1 (numbers, Hz) sampled at rate fs (number, Hz) for n (integer) samplesPlotting
sylvesterSolves 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
sysidModel selection: fits a ladder of standard topologies and picks one by an information criterionSignal processing
sysinfoReturns 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

tableEach 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
tailReturns the first (head) or last (tail) n elements/rows, same type as sCollections & strings
takeReturns the same type as xs: the first n elements (take) or everything after them (drop)Collections & strings
tanStandard trigonometric functions, computed elementwiseCore maths
tanhHyperbolic sine/cosine/tangent, elementwiseCore maths
tape_resetDiscards every entry recorded so far on the autodiff tape, freeing the memory a chain of param/grad calls has built upStatistics & ML
tcdfStudent t cumulative distribution at t with nu (positive, need not be an integer) degrees of freedomStatistics & ML
tcp_acceptReturns a TcpListener handle from tcp_listen, and a TcpConn handle from tcp_acceptConcurrency
tcp_closesock 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_connecttcp_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_listenReturns a TcpListener handle from tcp_listen, and a TcpConn handle from tcp_acceptConcurrency
tcp_porttcp_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_recvNeither call frames the message for you — TCP is a stream, so a length prefix or delimiter is yours to add if you need distinct messagesConcurrency
tcp_sendNeither call frames the message for you — TCP is a stream, so a length prefix or delimiter is yours to add if you need distinct messagesConcurrency
tellReports f's (file handle, opened readable) current read positionFile I/O
texNot 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 stringPlotting
textPlain text label text (string) placed at (x, y) (numbers, data units), no marker dot -- by default just up and to the right of the pointPlotting
tfReturns 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
thdReturns a single number, dB below the fundamentalSignal processing
thd_nReturns 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
themeSets the whole-figure visual theme from name (string): one of "default", "publication", "bw", "minimal", "grey", "classic"Plotting
thresholdElementwise binary threshold, general-purpose (not image-specific)Images
ticStarts (or restarts) the single global stopwatchREPL & diagnostics
timestampsAdded in v0.2.4. The absolute time axis as a vector, start_time + i/Fs for each sampleSignal processing
tinvInverse of tcdf -- the t critical value: tinv(0.975, 10) is 2.228Statistics & ML
titleSets the current panel's title to text (string)Plotting
tkeoReturns a length-(N-2) vector (like diff, doesn't pad — the definition needs a neighbor on each side)Signal processing
tmp_fileCreates 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_boolFor 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_cmykTakes 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_digitalReturns 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_floatThe parsing half of to_int without the rounding — mostly for turning text read from a file or an instrument into a numberCollections & strings
to_hslTakes 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_hsvTakes 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 numbersPlotting
to_intRounds to the nearest whole number, ties away from zero — the same primitive round uses, so the two agree by construction rather than by coincidenceCollections & strings
to_labTakes 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_rgbTakes 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_unitAdded 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 itSignal processing
to_vecReturns a List: the linked list's elements, front to backCollections & strings
tocReturns a number: elapsed seconds (float, fractional) since the last tic()REPL & diagnostics
toeplitzToeplitz 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 cCore maths
tolowerReturns a Str: C's names for upper/lower, accepted so a ported line does not have to be editedCollections & strings
touchUnix 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 contentFile I/O
toupperReturns a Str: C's names for upper/lower, accepted so a ported line does not have to be editedCollections & strings
tpdfStudent t probability density at t with nu degrees of freedomStatistics & ML
traceThe sum of the diagonal of M, a square (or rectangular — only min(rows,cols) diagonal entries are summed) MatCore maths
trace_diffCompares two traces sample by sample and returns a record instead of raising, so a test can assert on it and a report can print itSignal processing
trace_loadReads a .csv or .npz trace and returns a record with one Vec per signal, in the order they were saved, whichever format it came fromSignal processing
trace_saveWrites a trace (a record of real vectors or a table of numeric columns, all the same length) to pathSignal processing
trackWraps 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_loopRuns 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_splitSplits 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_splitThree-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_functionReturns 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
transformApplies a fitted scaler Record scaler's stored parameters to a new matrix/vector/table newX with the same columns it was fitted onStatistics & ML
transformer_blockOne 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_normStatistics & ML
transposeMatrix/vector transpose: swaps rows and columnsCore maths
trapzTrapezoid-rule integral of the samples y against x (unit spacing when x is omitted), summed with compensated (Neumaier) summationSignal processing
tree_modelOne 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
triangleEach generates one period-repeating waveform: freq (number, Hz), fs (number, sample rate in Hz), n (integer, sample count) are all scalars, in that orderPlotting
trilLower/upper triangle of A, other entries set to 0Core maths
trimStrips characters from both ends of a stringCollections & strings
triuLower/upper triangle of A, other entries set to 0Core maths
trndRandom draws from the Student t distributionStatistics & ML
tsnet-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
tstatMean and variance of the Student t distribution with these parameters, as a result with fields .mean and .varStatistics & ML
tv_denoiseTotal-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 variationNoise
typeReturns a Str: the value's type, e.g. "number", "string", "vector", "matrix", "table", "layer"Collections & strings

U

ucaseBASIC's names for upper/lower; toupper/tolower are C's names for the same thingCollections & strings
ui_buttonDeclares a push-button, labeled label (string); id= (string) as abovePlotting
ui_checkboxDeclares an on/off toggle, labeled label (string)Plotting
ui_numberDeclares a free-entry number box (for a value you type exactly rather than sweep), labeled label (string)Plotting
ui_selectDeclares a dropdown, labeled label (string), choosing among options (a List of strings — or of any values, displayed via their string form)Plotting
ui_sliderDeclares 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_textDeclares a free-text field, labeled label (string)Plotting
undershootReturns 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
unidcdfCumulative discrete uniform distribution P(X <= k), a step function of floor(k)Statistics & ML
unidinvInverse 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
unidpdfProbability mass of the discrete uniform distribution at k (a number, vector or matrix, elementwise); zero at a non-integer or out-of-support kStatistics & ML
unidrndRandom draws from the discrete uniform distributionStatistics & ML
unidstatMean and variance of the discrete uniform distribution with these parameters, as a result with fields .mean and .varStatistics & ML
unifcdfCumulative continuous uniform distribution P(X <= x)Statistics & ML
unifinvInverse of unifcdf: the x with unifcdf(x) = p, for p in [0, 1] (outside is an error)Statistics & ML
unifitMaximum-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
uniformDraws from the uniform distribution on [a, b), two numbers a < b, with the same rows/cols/seed= shape as randStatistics & ML
unifpdfProbability density of the continuous uniform distribution at x (a number, vector or matrix, elementwise)Statistics & ML
unifrndRandom draws from the continuous uniform distributionStatistics & ML
unifstatMean and variance of the continuous uniform distribution with these parameters, as a result with fields .mean and .varStatistics & ML
uniqueReturns a Vec: a sorted, de-duplicated copyCollections & strings
unit_scaleReturns the scale factor a unit name = ... declaration registered, or errors naming name if nothing was ever declared under itREPL & diagnostics
unpackThe inverse of pack: bytes is a byte buffer, spec the same field listCollections & strings
updateEstimation-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
upperUnicode-aware uppercase conversionCollections & strings
upsampleRaises 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 amplitudeSignal processing

V

valMaterializes 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 landsCore maths
value_and_gradTakes 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 xREPL & diagnostics
valuesReturns a List: its keys (keys), its values (values), or (key, value) tuples (items) — insertion order, not sortedCollections & strings
vanderVandermonde 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
vanicekReturns 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
varSample variance, same N-1 (unbiased) denominator as std, so var(x) == std(x)^2 always holdsCore maths
verify_signalStructural 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
violinThe 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
viterbiRuns the Viterbi algorithm on an hmm model hmm for a length-T integer observation sequence obs (same encoding as forward)Statistics & ML
vlineDraws a vertical reference line spanning the whole panel at x (number, data units)Plotting
vmapApplies 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
vmdVariational 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
voronoiComputes the Voronoi diagram of an (N, 2) point matrix points, built on a real Delaunay triangulationStatistics & ML
vstackNamed equivalents of bracket-literal block concatenation ([a, b] horizontally / [a; b] vertically)Core maths
vswrReturns (1 + |Γ|)/(1 - |Γ|)Signal processing

W

warburgAw (1-j)/sqrt(w) — semi-infinite diffusion, a constant −45° phase at every frequencySignal processing
warburg_openRw coth(x)/x, x = sqrt(jw tau) — finite length, reflecting boundarySignal processing
warburg_shortRw tanh(x)/x, x = sqrt(jw tau) — finite length, transmissive boundarySignal processing
warnNon-fatal — execution continues on the next line, unlike errorREPL & diagnostics
waterfallA 2-D approximation of the stacked-trace look — no true 3-D projection yetPlotting
wblcdfCumulative Weibull distribution P(X <= x)Statistics & ML
wblfitMaximum-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
wblinvInverse of wblcdf: the x with wblcdf(x) = p, for p in [0, 1] (outside is an error)Statistics & ML
wblpdfProbability density of the Weibull distribution at x (a number, vector or matrix, elementwise)Statistics & ML
wblrndRandom draws from the Weibull distributionStatistics & ML
wblstatMean and variance of the Weibull distribution with these parameters, as a result with fields .mean and .varStatistics & ML
welchReturns a spectrum of nperseg/2 + 1 one-sided bins (DC to Nyquist), stamped norm = "density" — SciPy's "density" scaling, units²/HzSignal processing
whereOne 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_villeWigner-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 signalSignal processing
windowReturns the named window as a length-n real vectorSignal processing
worker_doneNon-blocking check of whether worker w (a Worker handle from spawn) has finishedConcurrency
wrapReturns 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
writeDispatches on the type of the first argumentREPL & diagnostics
write_arrayWrites 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 hadFile I/O
write_binThe inverse of read_bin: writes raw bytes to f (file handle, opened writable/appendable)File I/O
write_bitWrites one bit to f (file handle, opened writable/appendable)File I/O
write_byteWrites one raw byte to f (file handle, opened writable/appendable)File I/O
write_charWrites s (string) to f (file handle, opened writable/appendable) with no newline addedFile I/O
write_csvWrites a Table to a CSV fileFile I/O
write_doubleWrites n (number) to f (file handle, opened writable/appendable) as a 64-bit IEEE-754 floatFile I/O
write_floatWrites n (number) to f (file handle, opened writable/appendable) as a 32-bit IEEE-754 floatFile I/O
write_intThe mirror of read_int, writing value (a number) to f (file handle, opened writable/appendable) in the given width and byte orderFile I/O
write_int16Writes n (number) to f (file handle, opened writable/appendable) as a signed 16-bit integerFile I/O
write_int32Writes n (number) to f (file handle, opened writable/appendable) as a signed 32-bit integerFile I/O
write_int64Writes n (number) to f (file handle, opened writable/appendable) as a signed 64-bit integerFile I/O
write_lineWrites s (string) to f (file handle, opened writable/appendable) plus a trailing \nFile I/O
write_npyWrites 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_npzWrites the fields of a record as an uncompressed .npz (what numpy.savez makes); each field is stored as write_npy would store itFile I/O
write_reportWrites 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_textWrites the whole string to a file, overwriting itCollections & strings
write_uint16Writes n (number) to f (file handle, opened writable/appendable) as an unsigned 16-bit integerFile I/O
write_uint32Writes n (number) to f (file handle, opened writable/appendable) as an unsigned 32-bit integerFile I/O
write_uint64Writes n (number) to f (file handle, opened writable/appendable) as an unsigned 64-bit integerFile I/O
writelineWrites its arguments, space-separated, and a newline, to stdoutCollections & strings

X

xbreakReshapes 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 onlyPlotting
xcorrReturns a length-N+M-1 vector, the full lag range (zero lag at the middle for equal-length inputs)Signal processing
xlabelLabels the current panel's x-axis with text (string)Plotting
xlimFixes an axis range from lo, hi (numbers, data units)Plotting
xml2csvstr (string, XML text) is converted to CSV text: exactly csvify(parse_xml(str)). Returns a stringFile I/O
xml2jsonLike csv2json, this produces the same plain array-of-row-objects shape, not jsonify(parse_xml(str))'s type-tagged envelopeFile I/O
xmlifyConverts any value (any Value) to an XML string — see "The Value<->XML mapping" belowFile I/O
xorReturns a bool: logical XOR, non-short-circuit like and/orCollections & strings
xscaleSets that axis's scale from a string, "linear" or "log"Plotting
xspanDraws a translucent vertical band covering x in [x0, x1] (numbers, data units) across the panel's full heightPlotting
xticklabelsSets categorical x tick labels from the given strings (variadic positional arguments); without an xticks(...) call, spread evenly across the current x-extentPlotting
xticksSets explicit x tick positions from positions (Vec of numbers, data units), paired in order with xticklabels(...) when both are setPlotting

Y

ybreakSame as xbreak, on the y-axis: squeezes out [lo, hi] (numbers, data units)Plotting
ylabelLabels the current panel's y-axis with text (string)Plotting
ylimFixes an axis range from lo, hi (numbers, data units)Plotting
yscaleSets that axis's scale from a string, "linear" or "log"Plotting
yspanDraws a translucent horizontal band covering y in [y0, y1] (numbers, data units) across the panel's full widthPlotting
yticklabelsyticks takes a Vec of numbers (tick positions, data units); yticklabels takes variadic strings to relabel them in orderPlotting
yticksyticks takes a Vec of numbers (tick positions, data units); yticklabels takes variadic strings to relabel them in orderPlotting

Z

zerosA 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_likeA 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 itCore maths
zetaThe 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
zipReturns a List of tuples, pairing up the collections element by element, stopping at the shortestCollections & strings
zlib_decompressInflates 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 bytesFile I/O
zoom_insetMagnifies 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
zpkReturns 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_flacDecodes a FLAC file to samplesFile I/O
codec.decode_mp3Decodes an MP3 file. Same arguments and same two return forms as codec.decode_flacFile I/O
codec.decode_wavDecodes a WAV file. Same arguments and same two return forms as codec.decode_flacFile I/O
codec.encode_wavThe 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_infoReads a FLAC file's header without decoding any audio, which is how to check a file is what you expect before paying for the samplesFile I/O
codec.write_wavWrites audio out as a WAV fileFile I/O
xlsx.add_chartAdds a native Excel chart that refers to the cells, so it follows later edits in Excel/LibreOfficeFile I/O
xlsx.add_commentAttaches a note to a cell (the red corner; the text shows on hover)File I/O
xlsx.add_imagePlaces 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_chartA 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 roundFile I/O
xlsx.add_sheetAdds 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_validationRestricts what can be typed into rangeFile I/O
xlsx.autofilterPuts filter buttons on the header row of range (header row plus the data below it)File I/O
xlsx.clearEmpties a range: what="contents" removes values and formulas and keeps the formatting, "formats" removes the formatting and keeps the values, "all" bothFile I/O
xlsx.color_scaleColours 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 percentileFile I/O
xlsx.column_widthColumn width in Excel's character units (0-255); xlsx.row_height(wb, sheet, row, points) sets a row's heightFile I/O
xlsx.conditional_formatHighlights 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_sheetCopies 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_tableTurns 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_nameA workbook-level defined name, e.g. xlsx.define_name(wb, "Frequency", "Data!$A$2:$A$100")File I/O
xlsx.delete_columnsnot described in a chapter yet
xlsx.delete_rowsnot described in a chapter yet
xlsx.delete_sheetnot described in a chapter yet
xlsx.discardReleases the handle early; handles otherwise live until the run endsFile I/O
xlsx.fill_formulaStores 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_cellsFormats 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/rightFile I/O
xlsx.formulaThe formula in a cell without its leading =, or noneFile I/O
xlsx.freeze_panesFreezes the rows above and the columns left of cell: "A2" keeps the header row in view, "B2" the header row and first columnFile I/O
xlsx.get_cellThe value of one cell, cell as Excel shows it ("B3"); sheet is a name or a 0-based indexFile I/O
xlsx.get_rangeA 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 numberFile I/O
xlsx.hide_sheetHides 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_columnsnot described in a chapter yet
xlsx.insert_rowsInserts n rows before 1-based row, shifting referencesFile I/O
xlsx.mergeMerges a range into one cellFile I/O
xlsx.move_rangeMoves 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.newA new workbook with one empty sheet, Sheet1File I/O
xlsx.openOpens 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_asFile I/O
xlsx.readReads one worksheet of a workbook into a Table, the same type read_csv produces, so everything that consumes a CSV consumes a spreadsheet unchangedFile I/O
xlsx.rename_sheetnot described in a chapter yet
xlsx.row_heightnot described in a chapter yet
xlsx.save_asWrites the workbook to path (overwriting)File I/O
xlsx.set_cellSets one cell to a number, string, boolean, or none (empty)File I/O
xlsx.set_formulaStores a formula (the = is optional)File I/O
xlsx.set_rangeWrites 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 anchorFile I/O
xlsx.sheetsNames a workbook's worksheets without reading any of them, so a program can find out what it is holding before deciding what to loadFile I/O
xlsx.sort_rangeSorts 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_pdfConverts the workbook to PDF through LibreOffice (see docx.to_pdf)File I/O
xlsx.used_rangeThe smallest range covering every non-empty cell, e.g. "A1:D20", or none for an empty sheetFile I/O
xlsx.writeWrites a Table out as a one-worksheet workbookFile I/O
pptx.newA new, empty 16:9 presentation with four layouts: Title Slide, Title and Content, Title Only, BlankFile I/O
pptx.openOpens a presentation for reading and editing and returns a handle -- surgical editing, as docx.openFile I/O
pptx.save_asWrites the presentation. Refused under --sandboxFile I/O
pptx.discardnot described in a chapter yet
pptx.infoDocument properties plus slides, width_mm, height_mm and layoutsFile I/O
pptx.set_infonot described in a chapter yet
pptx.slide_countThe 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.slidesnot described in a chapter yet
pptx.slide_textnot described in a chapter yet
pptx.slide_titlenot described in a chapter yet
pptx.notesnot described in a chapter yet
pptx.find_textIndices of the slides containing textFile I/O
pptx.replace_textReplaces across every slide (and the speaker notes unless notes=false), across formatting runs, keeping each match's formattingFile I/O
pptx.layoutsThe layout names add_slide can useFile I/O
pptx.add_slideAdds 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_slideDeletes a slide with its notes, and removes it from any sectionFile I/O
pptx.move_slidenot described in a chapter yet
pptx.duplicate_slidenot described in a chapter yet
pptx.hide_slidenot described in a chapter yet
pptx.unhide_slidenot described in a chapter yet
pptx.add_textAdds a text box to slide i. Positions are millimetres from the top-left corner or lengths (20 mm); size in pointsFile I/O
pptx.add_imageAdds a PNG/JPEG/GIF; give one of w/h and the other follows the aspect ratio, neither and it is centred at 96 dpiFile I/O
pptx.add_tableAdds a table (from a Table, matrix or list of rows) in PowerPoint's built-in Medium Style 2File I/O
pptx.to_markdownOne ## Slide N: title section per slide, the other text as bullets and the notes as a quoteFile I/O
pptx.to_pdfConverts to PDF through LibreOffice, as docx.to_pdfFile I/O
pptx.set_notesSets slide i's speaker notes (newlines start paragraphs)File I/O
pptx.shapesThe 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_textReplaces a text box's, placeholder's or shape's text, one paragraph per line, keeping the first run's formattingFile I/O
pptx.delete_shapeDeletes a shape; a relationship only it used goes too, and an image no other part uses is removed from the packageFile I/O
pptx.move_shapeMoves a shape (mm or lengths); pptx.resize_shape(p, i, shape, [w=], [h=]) resizes itFile I/O
pptx.resize_shapenot described in a chapter yet
pptx.set_slide_titleSets the slide's title placeholder text, adding the title placeholder from the slide's layout if the slide has noneFile I/O
pptx.bring_to_frontDraws the shape on top of the others; pptx.send_to_back(p, i, shape) behind themFile I/O
pptx.send_to_backnot described in a chapter yet
pptx.set_linkMakes 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.linksnot described in a chapter yet
pptx.theme_colorsThe theme's colour scheme as a record of #RRGGBB strings: dk1, lt1, dk2, lt2, accent1...accent6, hlink, folHlinkFile I/O
pptx.theme_fontsnot described in a chapter yet
pptx.set_theme_colorsSets colour-scheme slots ("#RRGGBB"); pptx.set_theme_fonts(p, [major=], [minor=]) sets the heading/body typefacesFile I/O
pptx.set_theme_fontsnot described in a chapter yet
pptx.add_chartAdds 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 idFile I/O
pptx.add_nyquist_chartA 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 roundFile I/O
pptx.add_shapeAdds a shape to slide i and returns its idFile I/O
pptx.align_shapesLines 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_shapeSets the shape's rotation to degrees clockwise (0 or 360 clears it; a negative angle turns it the other way)File I/O
docx.newA new, empty A4 document with Normal, Title and Heading 1-3 stylesFile I/O
docx.openOpens a Word document for reading and editing and returns a handleFile I/O
docx.save_asWrites the document (overwriting)File I/O
docx.discardnot described in a chapter yet
docx.full_textEvery paragraph's text in document order -- body, tables, text boxes -- one per line, tabs and line breaks includedFile I/O
docx.paragraphsThe body-level paragraphs as a List of StrFile I/O
docx.headingsA 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 0File I/O
docx.find_textIndices of the body paragraphs containing text, as a vectorFile I/O
docx.replace_textReplaces old with new everywhere text lives -- body, tables, text boxes, headers, footers, footnotes, endnotes, comments -- even where Word split the text across formatting runsFile I/O
docx.set_paragraphReplaces body paragraph i's text, keeping its paragraph style and its first run's character formattingFile I/O
docx.insert_paragraphInserts a paragraph so it becomes body paragraph i; takes the same keywords as add_paragraphFile I/O
docx.remove_paragraphnot described in a chapter yet
docx.add_headingAppends 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_paragraphAppends a paragraph. size in points, color #rrggbb, align left/center/right/justify, style a paragraph style id (Quote)File I/O
docx.add_page_breakAppends a page breakFile I/O
docx.add_tableAppends 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 rowsFile I/O
docx.add_imageAppends a PNG, JPEG or GIF as its own paragraphFile I/O
docx.tablesEvery body table as a list of rows of cell textsFile I/O
docx.set_cellnot described in a chapter yet
docx.comments{author, date, text} recordsFile I/O
docx.footnotesnot described in a chapter yet
docx.endnotesnot described in a chapter yet
docx.infoA record of the document properties (title, creator, created, modified, ...) plus counts: paragraphs, words, characters, tables, images, comments, headingsFile I/O
docx.set_infonot described in a chapter yet
docx.accept_changesAccepts every tracked change (insertions kept, deletions dropped, formatting changes kept) in every part of the document; docx.reject_changes(doc) does the oppositeFile I/O
docx.reject_changesnot described in a chapter yet
docx.to_markdownThe content as Markdown: headings as #, tables as pipe tables, list paragraphs as - itemsFile I/O
docx.to_latexThe 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_pdfConverts to PDF by running LibreOffice headless in a private profile (so it neither needs nor disturbs an open LibreOffice)File I/O
docx.linksEvery hyperlink in the body (tables included) as {text, url} records; internal links come back as #nameFile I/O
docx.add_linkMakes body paragraph i -- all of it, or the first occurrence of the text on (case-sensitive) -- a hyperlink to urlFile I/O
docx.add_commentAttaches a comment to body paragraph i (or to the text on in it), creating the document's comments part when it has noneFile I/O
docx.bookmarksnot described in a chapter yet
docx.add_bookmarkPuts a bookmark named name around body paragraph i (or the text on in it) -- the target for add_cross_ref and #name linksFile I/O
docx.add_cross_refAppends 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.fieldsnot described in a chapter yet
docx.add_fieldAppends 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_tocInserts a table-of-contents field for heading levels 1 to levels, before body paragraph at (or at the end), optionally under a title paragraphFile I/O
docx.sectionsEach 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_setupChanges 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_breakEnds 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_textThe text of a section's header (following inheritance from earlier sections), one line per paragraph, or none if it has noneFile I/O
docx.footer_textnot described in a chapter yet
docx.set_headerSets a header's text, replacing its content (creating the header part if there is none)File I/O
docx.set_footernot described in a chapter yet
docx.add_list_itemAppends a bulleted (kind="bullet") or numbered (kind="number") list paragraph at nesting level 0-8, creating the document's numbering definitions when it has noneFile I/O
docx.set_listMakes existing body paragraph i a list item, or plain again with kind="none"File I/O
docx.add_columnInserts a column so it becomes grid column at (default: appended), with one value per rowFile I/O
docx.add_footnoteCreates 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 paragraphFile I/O
docx.add_rowInserts a row into body table table (0-based) so it becomes row at (default: appended)File I/O
docx.format_textFormats existing text in body paragraph i: the first occurrence of on, every occurrence with all=true, or the whole paragraph when on is omittedFile I/O
docx.line_spacingSets spacing for body paragraphs i through to (default: just i)File I/O
docx.merge_cellsMerges 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_paragraphMoves body paragraph from so that it becomes body paragraph to (as numbered after the move)File I/O
docx.split_cellUndoes a merge: the merged cell containing grid cell (row,col) becomes its individual cells again, the text staying in the top-left oneFile I/O
docx.track_deleteMarks 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_insertInserts 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_annotationAdds a simple annotation to a page (page counts from 1)File I/O
pdf.add_attachmentEmbeds a file under filenameFile I/O
pdf.add_bookmarkAdds a new outline entry titled title, pointing at page_index (one-based)File I/O
pdf.add_linkAdds a /Link annotation over rect= that jumps to target_page= (one-based) of the SAME documentFile I/O
pdf.add_pageInserts a blank page at index (numbered from 1; one past the last page appends)File I/O
pdf.add_textStamps 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.annotationsA 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.attachmentsThe 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_boxThe page's /CropBox -- the region a viewer actually shows, which can be smaller than /MediaBoxFile I/O
pdf.crop_pageSets a page's /CropBox to the given rectangle (PDF points)File I/O
pdf.delete_pageRemoves page. Every other page's own resources, fonts and content are untouchedFile I/O
pdf.duplicate_pageInserts a copy of page immediately after itFile I/O
pdf.extract_attachmentThe raw bytes of the first embedded file named filename; a name that is not there is a named errorFile I/O
pdf.extract_imageDecodes image number index (from pdf.images) of page page to an ImageFile I/O
pdf.extract_pagesA new PDF holding just the pages asked forFile I/O
pdf.extract_textText reconstructed from a PDF's content streamsFile I/O
pdf.find_textSearches 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.imagesLists 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.infoReads what a PDF says about itself, without extracting any contentFile I/O
pdf.media_boxThe page's /MediaBox -- the boundary a PDF prints on, in PDF points (1/72 inch)File I/O
pdf.mergeJoins several PDFs into one, in list order, keeping every pageFile I/O
pdf.move_pageRelocates page from so it becomes page to, keeping every other page's relative orderFile I/O
pdf.outlinesThe document's bookmark/outline tree, flattened into a Table — one row per entry, depth-firstFile I/O
pdf.page_countCounts a PDF's pages. src (string path, or Vec of bytes) is the documentFile I/O
pdf.remove_annotationRemoves the index-th entry of a page's /Annots array (the index pdf.annotations reports), deleting the underlying object tooFile I/O
pdf.renderRenders 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_textChanges text in an existing PDF and returns the edited file as a Vec of bytes (save with bytes_write)File I/O
pdf.reverse_pagesReverses page order: the last page becomes the first and vice versaFile I/O
pdf.rotate_pageSets a page's /Rotate -- degrees a viewer turns the page CLOCKWISE before displayFile I/O
pdf.set_metadataWrites 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 clearedFile I/O
pdf.split_atSplits src into exactly two documents at index (numbered from 1): the first holds pages 1..index, the second index..page_countFile I/O
pdf.split_everySplits src into consecutive chunks of up to n pages each, in document order (the last chunk may be shorter)File I/O
pdf.strip_metadataRemoves 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_diffA coarse, non-content comparison: page count, per-page /MediaBox size, whether each document has an outline (/Outlines) and each document's total annotation countFile I/O
pdf.text_diffPage-by-page text diff of two documents, built entirely on pdf.extract_text/pdf.page_countFile I/O
pdf.to_htmlA 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_mergeExactly pdf.merge, written to a file instead of returnedFile I/O
pdf.write_pagesExactly pdf.extract_pages, written to a file instead of returnedFile I/O
image.loadnot described in a chapter yet
image.lumanot described in a chapter yet
image.regionsReturns 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.blurnot described in a chapter yet
image.cannynot described in a chapter yet
image.bilateralnot described in a chapter yet
image.distance_transformnot described in a chapter yet
image.skeletonnot described in a chapter yet
image.fill_holesnot described in a chapter yet
image.contoursnot described in a chapter yet
image.autocropnot described in a chapter yet
image.sobelComputes the 3x3 Sobel gradient over img's BT.601 luma (replicate/clamped border)Images
image.scharrSame 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.laplacianAny other kernel_size is refused by nameImages
image.gradient_magnitudeGradient 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.rgb2hsvPer-pixel RGB→HSV conversion (the whole-Image counterpart to the scalar to_hsv), reusing the exact same conversion the scalar builtin usesImages
image.hsv2rgbConverts back to 8-bit RGB, rounding and clamping each channel to 0..255Images
image.rgb2labPer-pixel sRGB→CIE L\*a\*b\* conversion (D65 white point), the whole-Image counterpart to the scalar to_lab, reusing its exact conversion mathImages
image.lab2rgbConverts back to 8-bit sRGB, clamped into gamutImages
image.watershedMarker-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.rectAn axis-aligned rectangle with its top-left corner at (x, y)Images
svg.circleA circle of radius r centred on (cx, cy); r must be 0 or moreImages
svg.lineA straight segment from (x1, y1) to (x2, y2)Images
svg.pathAn arbitrary path from the SVG path-data string dImages
svg.textA text run anchored at (x, y) — which in SVG is the *baseline start*, not the top-left cornerImages
sparse.from_tripletsnot described in a chapter yet
sparse.from_densenot described in a chapter yet
sparse.eyenot described in a chapter yet
sparse.diagnot described in a chapter yet
sparse.randomnot described in a chapter yet
sparse.sizenot described in a chapter yet
sparse.nnznot described in a chapter yet
sparse.densitynot described in a chapter yet
sparse.to_densenot described in a chapter yet
sparse.getnot described in a chapter yet
sparse.tripletsnot described in a chapter yet
sparse.transposenot described in a chapter yet
sparse.addnot described in a chapter yet
sparse.subnot described in a chapter yet
sparse.scalenot described in a chapter yet
sparse.mulnot described in a chapter yet
sparse.hadamardnot described in a chapter yet
sparse.solvenot described in a chapter yet
sparse.cgnot described in a chapter yet
sparse.gmresnot described in a chapter yet
sparse.bicgstabnot described in a chapter yet
sparse.diffmatnot described in a chapter yet
sparse.laplaciannot 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