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.

936 builtins, 932 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 (there is no two-argument atan2 in this table)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
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_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
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
allReturns a bool: whether every (all) or at least one (any) element satisfies itCollections & strings
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
anyReturns a bool: whether every (all) or at least one (any) element satisfies itCollections & 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
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
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 (there is no two-argument atan2 in this table)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 (there is no two-argument atan2 in this table)Core 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
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
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
bin2decReads a binary digit string as a numberCollections & strings
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
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
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
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
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

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
cheby1Returns a Model (kind "filter", field sos)Signal processing
cheby2Returns a Model (kind "filter", field sos)Signal processing
chi2cdfChi-square cumulative distribution P(X <= x) at x (a number or vector, elementwise) with k degrees of freedomStatistics & 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
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
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
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
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
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
cumsumReturns the running sum, same type/length as x; a Signal input stays a Signal with the same FsCollections & strings
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

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
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
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
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
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
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
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
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
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
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
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
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
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
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
fall_timeReturns a single number: the transition time of the first complete rising (respSignal processing
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_sizeReports a file's size without opening itFile 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
filterReturns a Table containing only the rows where mask is trueCollections & strings
filter_baReturns a same-length vector or SignalSignal 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
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
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
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
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
freqzReturns a length-n complex vector (CVec), the response H(e^{jω}) at n points from DC to Nyquist inclusiveSignal 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
gammaThe gamma function (gamma(n) = (n-1)! for a positive integer n) and its natural log (lgamma(x) = ln|gamma(x)|)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
gerischerZg/sqrt(k + jw) — a coupled chemical reactionSignal processing
getget returns the stored value (any type) or none if key is absentCollections & 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
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
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

hammingReturns a length-n real vectorSignal 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
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
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
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
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

I

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 frequencySignal 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
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
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
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
itemsReturns a List: its keys (keys), its values (values), or (key, value) tuples (items) — insertion order, not sortedCollections & strings

J

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
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
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
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
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
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
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
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
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 and BMPImages
load_modelReads a model previously written by save_model back from the HDF5 file at the string pathStatistics & ML
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
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
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
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

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
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
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
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
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
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
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
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
nnlsNon-negative least squares by Lawson-Hanson, for when a negative coefficient would be physically meaningless — a concentration, a mass, a relaxation strengthCore 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
normpdfGaussian probability density at x (a number or vector, elementwise) with mean mu (default 0) and standard deviation sigma (default 1)Statistics & ML
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
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

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
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
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
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

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 length-N/2 + 1 real vector, same scaling as welchSignal 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
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
pmapReturns a List: f applied to every elementCollections & strings
pointMarks a single position (x, y) (numbers, data units) with a dotPlotting
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
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
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
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
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
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
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 length-nfft/2 + 1 real vector, the one-sided Welch PSD in SciPy's "density" scaling, exactly as welch does — literally the same code path, so psd(x, fs) and welch(x, fs)..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
qrThin QR decomposition of A (r×c Mat), A = Q·RCore maths
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
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_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_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
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_replaces, pattern and repl are Strs; optional count (number, default: all occurrences) caps how many replacements are made. $1 and ${name} in repl refer to capture groups. Returns..Collections & 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
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
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. Refuses a non-empty directory unless recursive=true — this check applies whether or not recycle_bin is set, since "may I remove a whole tree" and "should..File I/O
remove_fileDeletes path (a Str). Errors if it does not exist or is not a regular file, rather than silently doing nothingFile 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
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
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) — a fractional 0–1 fourth channel is an opacity, a whole number 0–255 is a byte value like the..Plotting
rgbaBuilds a colour from channel numbers: r, g, b (and, for rgba, a fourth channel a) — a fractional 0–1 fourth channel is an opacity, a whole number 0–255 is a byte value like the..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
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
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
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

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
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: a .png extension writes a real (if uncompressed) PNG; any other extension, or none, writes a BMPImages
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
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
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 none if key is absentCollections & strings
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
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
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 longConcurrency
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
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
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
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
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
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
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
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
svdThin SVD of A (r×c Mat or CMat), A = U·diag(s)·Vᵀ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
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
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
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 dotPlotting
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
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_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_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
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
traceThe sum of the diagonal of M, a square (or rectangular — only min(rows,cols) diagonal entries are summed) MatCore maths
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
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
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
trimStrips characters from both ends of a stringCollections & strings
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
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
uniformDraws from the uniform distribution on [a, b), two numbers a < b, with the same rows/cols/seed= shape as randStatistics & 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
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

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
valuesReturns a List: its keys (keys), its values (values), or (key, value) tuples (items) — insertion order, not sortedCollections & strings
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
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
welchReturns a length-nperseg/2 + 1 real vector, the one-sided PSD (DC to Nyquist) in SciPy's "density" scaling — Welch's method segments x into overlapping windowed frames and averages..Signal 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
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_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
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

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.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.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.writeWrites a Table out as a one-worksheet workbookFile I/O

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.

circuit_impedance image preciseTimer timer