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_study | Computes one importance score per feature column of an N-row, D-column X and length-N y, using cv_folds folds (integer, default 3): the full model's cross-validated score minus.. | Statistics & ML |
abs | Absolute value on a real scalar/Vec/Mat; magnitude (sqrt(re^2 + im^2)) on a Complex scalar, CVec, or CMat | Core maths |
acf | Returns a vector of length max_lag+1 (lag 0 through max_lag), the autocorrelation function | Signal processing |
acos | Inverse trigonometric functions, single-argument only (there is no two-argument atan2 in this table) | Core maths |
acosh | Inverse hyperbolics. asinh is defined and finite on the whole real line | Core maths |
adadelta | Per-parameter learning rates derived from the running gradient history, given params (a Tensor to optimize) and lr (a number, default 0.001) | Statistics & ML |
adagrad | Per-parameter learning rates derived from the running gradient history, given params (a Tensor to optimize) and lr (a number, default 0.001) | Statistics & ML |
adam | The Adam family of per-parameter adaptive-learning-rate optimizers, given params (a Tensor to optimize) and a learning rate lr (a number, default 0.001) | Statistics & ML |
adamax | The Adam family of per-parameter adaptive-learning-rate optimizers, given params (a Tensor to optimize) and a learning rate lr (a number, default 0.001) | Statistics & ML |
adamw | The Adam family of per-parameter adaptive-learning-rate optimizers, given params (a Tensor to optimize) and a learning rate lr (a number, default 0.001) | Statistics & ML |
adc | Quantises x (a length-N number vector) the way a converter does — with a reference range, not just a step size, so a signal outside [vmin, vmax] clips instead of being quantised as if.. | Noise |
add | The operators as named functions, so an operation can be passed where a name is what you can pass | Core maths |
add_edge | Nodes are named; an edge carries an optional weight, defaulting to 1 | Collections & strings |
add_node | Nodes are named; an edge carries an optional weight, defaulting to 1 | Collections & strings |
add_noise | Adds noise of the named kind (a string — see the kinds table near the top of this chapter) to x, a length-N number vector or an Image (noise is added per-pixel, per-channel) | Noise |
affine_identity | Returns the 3x3 identity Mat — a no-op transform, useful as a composition base case | Images |
affine_rotate | Returns a new 3x3 Mat encoding a CCW rotation matrix in standard math convention (see the clockwise-on-screen note above for the visual difference from imrotate) | Images |
affine_scale | Builds a scaling transform for imwarp | Images |
affine_shear | Returns a new 3x3 Mat encoding that shear | Images |
affine_translate | Returns a new 3x3 homogeneous-coordinate Mat encoding that translation | Images |
after | after returns the piece of s past the first mark; before returns the piece up to it | Collections & strings |
after_last | Returns a Str: like after/before but searching from the end — the pair to reach for on a path or a dotted name | Collections & strings |
all | Returns a bool: whether every (all) or at least one (any) element satisfies it | Collections & strings |
and | Returns a bool. Both short-circuit: the right side is not evaluated when the left already decides the answer, so i < len(xs) and xs[i] > 0 is a safe guard | Collections & strings |
angle | Complex argument — the angle from the positive real axis, in radians (atan2(im, re)) — on a Complex/CVec/CMat; on a signed real scalar or real Vec/Mat it degrades to 0 for a.. | Core maths |
animate | Calls function "fn" (string) once per frame index from 0 to frames - 1 (integer) and writes the sequence to path (string) as one animated SVG, no JavaScript | Plotting |
annotate | Same as text — label text (string) at (x, y) (numbers, data units) — but also draws a marker dot at that point | Plotting |
any | Returns a bool: whether every (all) or at least one (any) element satisfies it | Collections & strings |
append | Returns a NEW Vec/List with value added at the end | Collections & strings |
append_all | Appends s to the end of the file at path, creating it if absent | Collections & strings |
append_text | Appends s to the end of the file at path, creating it if absent | Collections & strings |
apply | Returns the SAME container type and shape as x (a Signal(xs, fs) comes back as a new Signal at the same fs, a vector/matrix keeps its own shape, a bare number/boolean applies the.. | Signal processing |
apropos | Returns a List of strings: every builtin name containing that substring, in engine-registration order | REPL & diagnostics |
ar_model | Fits an autoregressive AR(p) model by Yule-Walker to a length-N numeric vector x, using the integer lag order order (this is p) | Statistics & ML |
arc | Draws part of a circle, as an open stroke | Plotting |
area | Filled area under the curve (x, y) (equal-length numeric Vecs) down to y=0; the zero-baseline special case of fill_between | Plotting |
arg | Complex argument — the angle from the positive real axis, in radians (atan2(im, re)) — on a Complex/CVec/CMat; on a signed real scalar or real Vec/Mat it degrades to 0 for a.. | Core maths |
argmax | 0-based index of the first-occurring minimum/maximum element of x (a scalar, Vec, or Mat/Signal, flattened) | Core maths |
argmean | Index into x (a Vec or flattened Mat/Signal) of the element closest to mean(x) (ties broken by first occurrence) — not a true order-statistic index like the others above, since.. | Core maths |
argmedian | Index into x (a Vec or flattened Mat/Signal) of the element sitting at the median position | Core maths |
argmin | 0-based index of the first-occurring minimum/maximum element of x (a scalar, Vec, or Mat/Signal, flattened) | Core maths |
argquantile | Index into x (a Vec or flattened Mat/Signal) nearest the q-quantile rank, computed as round(q*(n-1)) where n = len(x); q is a scalar in [0, 1] | Core maths |
argsort | Returns a Vec of number (0-based indices): the permutation that would sort x — the index-returning sibling of sort, same convention as argmin/argmax | Collections & strings |
argv | Returns a list of strings: the command-line arguments given after a literal -- in the invocation (e.g. qu run analyse.qu -- data.csv 1000 gives ("data.csv", "1000")) | File I/O |
arrow | Draws an arrow from (x0, y0) to (x1, y1) (numbers, data units), no label | Plotting |
arrowtext | Same as arrow — from (x0, y0) to (x1, y1) (numbers, data units) — but the arrowhead ends in a point labeled with text (string) | Plotting |
as_text | Returns a List of Str (each element formatted the way print would), so [1, 2, 3].as_text().join(", ") works | Collections & strings |
asc | Returns a number: the code point of its first character | Collections & strings |
asin | Inverse trigonometric functions, single-argument only (there is no two-argument atan2 in this table) | Core maths |
asinh | Inverse hyperbolics. asinh is defined and finite on the whole real line | Core maths |
astar_mrmr | A guided (A*) search on an N-row, D-column X and length-N y for a feature subset of size n_features (integer) that is relevant to the target and not redundant with itself.. | Statistics & ML |
at | Returns a Record: one row of the table by position, always positional even when the table carries a string index | Collections & strings |
atan | Inverse trigonometric functions, single-argument only (there is no two-argument atan2 in this table) | Core maths |
atanh | Inverse hyperbolics. asinh is defined and finite on the whole real line | Core maths |
available | Returns an integer: bytes waiting on the OS's serial input buffer right now, without blocking | Concurrency |
avgpool2d | Downsamples an (H, W) matrix x the same way as maxpool2d — size x size windows, stride defaulting to size — but takes the mean of each window instead of the max | Statistics & ML |
B
band_power | Returns the power in that frequency band by Parseval, normalised by N^2 so a tone of amplitude A reads A^2/2 | Signal processing |
band_zero | Returns a new spectrum at the same Fs, N and scaling with that band cleared — an ideal brick-wall notch | Signal processing |
bar | Bar chart: x (Vec of numbers or strings, category positions/labels) and y (Vec of numbers, bar heights) must be equal length | Plotting |
basin_hopping | Returns a Model (kind "minimize", same fields as minimize) | Signal processing |
beeswarm | Every sample drawn, nudged sideways only as far as it must be to clear its neighbours, so the WIDTH is the count | Plotting |
before | after returns the piece of s past the first mark; before returns the piece up to it | Collections & strings |
before_last | Returns a Str: like after/before but searching from the end — the pair to reach for on a path or a dotted name | Collections & strings |
bin2dec | Reads a binary digit string as a number | Collections & strings |
binomial | Exact binomial draws. n_trials (a positive integer) is how many trials each draw counts successes over; p (a number in [0, 1]) is the success probability of one trial; rows and.. | Statistics & ML |
bitand | Returns a number: the bitwise AND of a and b as 64-bit integers | Collections & strings |
bitcmp | Returns a number: the bitwise complement (!a) as a 64-bit integer | Collections & strings |
bitor | Returns a number: the bitwise OR | Collections & strings |
bitshift | Shifts an integer's bits left or right | Collections & strings |
bitxor | Returns a number: the bitwise XOR | Collections & strings |
blackman | Returns a length-n real vector | Signal processing |
blob_stats | Per-region area, centroid and bounding box, from a labelled image (identical operation to regionprops above) | Images |
block_process | Cuts x into consecutive blocks, calls f on each, and concatenates the results | Signal processing |
blur | Applies a fixed 3x3 box-average blur kernel | Images |
blur_backdrop | Figure-level (not per-panel) depth-of-field effect: (x0,y0)–(x1,y1) (numbers, fractions 0..1 of the whole rendered canvas) name the rectangle that stays sharp; everything else is.. | Plotting |
bode_magnitude | Magnitude half of a Bode plot: 20*log10(|Z|) vs. log-scaled frequency | Signal processing |
bode_phase | Phase half of a Bode plot: arg(Z) in degrees vs. log-scaled frequency | Signal processing |
box | Toggles the panel's bounding box | Plotting |
boxplot | One group per argument (each a Vec of numbers), placed at x = 0, 1, 2, ...; draws a Tukey five-number summary (min/Q1/median/Q3/max plus outliers) per group as a box-and-whisker | Plotting |
bubble | Scatter where marker radius encodes a third variable: x, y, sizes are equal-length numeric Vecs; the drawn radius is scaled from sizes's own min/max | Plotting |
builtins | Returns a List of strings: every name the engine answers to (hundreds of entries; the exact count grows as builtins are added) | REPL & diagnostics |
butter | Returns a Model (kind "filter", field sos) | Signal processing |
bwareaopen | Labels internally (8-connectivity, matching MATLAB's default) and zeroes out every blob whose pixel count is below min_area | Images |
bwlabel | Connected-component labeling. Returns a Model (kind "blobs") with fields .labels (a Mat of the same height/width as binary_img, integer label ids, background = 0), .count (a.. | Images |
C
capacitor | 1/(jwC) | Signal processing |
capitalize | Uppercases the first character, leaves the rest untouched | Collections & strings |
capture | Runs the named drawing function "fn" (string, a function you defined) into a scratch panel, passing along any further positional args..., and keeps what it drew as a value (a "layer") | Plotting |
cast | Returns a value of that kind. A conversion that is not defined is an error, not a best effort | Collections & strings |
cat | MATLAB-style concatenation: dim (a scalar, 1 or 2) selects the axis, then the 2+ remaining arguments (same shape rules as hstack/vstack) are joined along it — dim=1 vertical.. | Core maths |
cbrt | Real cube root, elementwise — unlike x^(1/3), correctly handles a negative x (cbrt(-8) = -2, not NaN) | Core maths |
cd | Changes the working directory to path (a Str) for the whole process, so every later relative path in the script resolves from there | File I/O |
ceil | Standard rounding functions, elementwise: floor toward negative infinity, ceil toward positive infinity, round to the nearest integer (half away from zero) | Core maths |
channel | Creates a new, empty channel. Returns a Channel handle (type(ch) == "channel"); cloning it shares the same underlying queue, not a separate copy | Concurrency |
channel_len | How many messages are queued right now on channel ch, without consuming any of them | Concurrency |
channel_recv | Blocks the calling thread until a value is available on channel ch, then pops and returns it (FIFO — oldest channel_sendd value first) | Concurrency |
channel_send | Pushes value (any value, any type) onto channel ch's queue and wakes one waiting channel_recv | Concurrency |
channel_try_recv | Non-blocking counterpart to channel_recv: returns none (Nothing) immediately if nothing is queued on channel ch right now, instead of waiting; otherwise pops and returns the next.. | Concurrency |
chars | Returns a List of one-character Strs | Collections & strings |
cheby1 | Returns a Model (kind "filter", field sos) | Signal processing |
cheby2 | Returns a Model (kind "filter", field sos) | Signal processing |
chi2cdf | Chi-square cumulative distribution P(X <= x) at x (a number or vector, elementwise) with k degrees of freedom | Statistics & ML |
chi2pdf | Chi-square probability density at x (a number or vector, elementwise) with k degrees of freedom (a positive number), computed in log space so it survives modest k without overflowing | Statistics & ML |
chirp | Identical to sweep above — same four positional arguments (start frequency, end frequency, sample rate, sample count) and the same method= (string, "linear" default or.. | Plotting |
chisquare | Draws from the chi-square distribution with k degrees of freedom (a positive integer), same rows/cols/seed= shape as rand | Statistics & ML |
chol | Lower-triangular Cholesky factor L of A = L·Lᵀ, where A is a symmetric positive-definite n×n Mat; errors clearly if A isn't positive-definite | Core maths |
chr | Returns a one-character Str from chr, and a number — the code point — from ord | Collections & strings |
circle | Draws a circle centered at (cx, cy) (numbers, data units) with radius r (number, data units) | Plotting |
circuit | Builds a circuit from a spec string and a flat parameter vector | Signal processing |
clamp | Elementwise clamp of x (a scalar, Vec, or Mat/Signal) into [lo, hi] | Core maths |
clip | Elementwise clamp of x (a scalar, Vec, or Mat/Signal) into [lo, hi] | Core maths |
close | Flushes and releases a file handle | File I/O |
cm | Length units as functions, converting a scalar v (millimetres/centimetres/inches/points as named) to the figure's own coordinate space — a tenth of a millimetre, so mm(1) is 10,.. | Core maths |
cmyk | Builds a colour from the printer's subtractive space: cyan c, magenta m, yellow y, key/black k, each a number 0–1 | Plotting |
coherence | Returns a single number: the largest inner product between any two different normalised columns of A | Noise |
colorbar | Accepted, with or without a [extend=]-style argument in the function form (so MATLAB-style scripts parse) but currently a documented no-op in both forms — no colorbar is actually drawn | Plotting |
colormap | Sets the current panel's categorical/sequential palette to name (string — see the Markers & Styling reference below for the full list) | Plotting |
cols | Row / column count of A. On a Vec (shape (n, 1)), a Mat/Signal (shape (r, c)), or a bare scalar (shape (1, 1)), returns the corresponding dimension as a scalar Num | Core maths |
compare | Returns a number: −1, 0 or 1, so it can drive a sort directly | Collections & strings |
compile | Attaches an optimizer Record (from sgd/adam/etc., default adam()) and a loss name string ("mse" or "cross_entropy", default "mse") to an input(n) |> dense(...) |> ..... | Statistics & ML |
complex | Returns a Complex. 3 + 4j is the literal form; this is for computed components | Collections & strings |
cond | The 2-norm condition number of A (an r×c Mat or CMat) — the ratio of its largest to smallest singular value | Core maths |
confusion_matrix | Draws a confusion-matrix heatmap comparing a length-N vector of true labels actual against a length-N vector of predicted labels predicted, over an optional integer n_classes.. | Statistics & ML |
conj | Complex conjugate (negates the imaginary part); passes a real x through unchanged | Core maths |
contains | Returns a bool: membership test via structural equality | Collections & strings |
contour | Iso-lines through scalar field Z (a Mat with len(y) rows and len(x) columns) over axis vectors x, y (Vecs of numbers); contourf fills the bands between levels instead of only.. | Plotting |
contourf | Iso-lines through scalar field Z (a Mat with len(y) rows and len(x) columns) over axis vectors x, y (Vecs of numbers); contourf fills the bands between levels instead of only.. | Plotting |
conv | Returns a vector of the length implied by mode | Signal processing |
conv1d | Slides a length-K learnable kernel vector over a length-N signal x, moving stride positions at a time (integer, default 1) with padding ("valid" — no padding, output shrinks —.. | Statistics & ML |
conv2d | Slides a (Kh, Kw) learnable kernel matrix over an (H, W) image matrix x, moving stride positions at a time (integer, default 1) with padding — "valid" (no padding) or "same".. | Statistics & ML |
copy_file | Copies src to dst, leaving the original in place | File I/O |
corr | Pearson correlation between two length-N numeric vectors x and y | Statistics & ML |
corr_heatmap | Computes the pairwise Pearson correlation of Table t's numeric columns | Plotting |
corrcoef | Called on an N-row, D-column matrix or table M, returns the full (D, D) matrix of pairwise Pearson correlations between its columns | Statistics & ML |
corrmat | Computes the pairwise Pearson correlation of Table t's numeric columns | Plotting |
corrplot | Computes the pairwise Pearson correlation of Table t's numeric columns | Plotting |
cos | Standard trigonometric functions, computed elementwise | Core maths |
cosh | Hyperbolic sine/cosine/tangent, elementwise | Core maths |
coth | The other three hyperbolics: coth(x) = cosh(x)/sinh(x), sech(x) = 1/cosh(x), csch(x) = 1/sinh(x) | Core maths |
count | Returns a number: how many non-overlapping times sub occurs in s (non-overlapping so it agrees with replace) | Collections & strings |
cov | Sample covariance between two length-N numeric vectors x and y, N-1 denominator — the same convention var and std use | Statistics & ML |
cpe | 1/(Q (jw)^n) — constant-phase element | Signal processing |
create_file | make_file with a collision policy: "error" (default) refuses if path already exists, "overwrite" truncates it like make_file does unconditionally, "skip" does nothing and.. | File I/O |
crest_factor | peak(x) / rms(x), a dimensionless ratio (a sine wave's is sqrt(2) ≈ 1.414) — the same quantity sinad_estimate(bits, crest_factor) takes as its second argument | Core maths |
crop | Extracts that sub-rectangle. Returns a new Image of exactly width x height pixels | Images |
cs_guarantee | Returns a single number: the largest sparsity level that the matrix's coherence alone can *prove* recoverable | Noise |
cs_recover | Compressed-sensing reconstruction of a sparse vector x from an M×N sensing matrix A and a length-M measurement vector y | Noise |
csch | The other three hyperbolics: coth(x) = cosh(x)/sinh(x), sech(x) = 1/cosh(x), csch(x) = 1/sinh(x) | Core maths |
csd | Returns a length-nperseg/2 + 1 complex vector (CVec), the one-sided cross-spectral density Pxy — Welch's method, sharing welch's own framing/windowing/averaging exactly, so it lines.. | Signal processing |
csv2json | Not jsonify(parse_csv(str)) — it emits a plain JSON array of one flat {"col": value, ...} object per row (the natural shape for feeding to another JSON-consuming tool), rather than.. | File I/O |
csv2xml | str (string, CSV text) is converted to XML: exactly xmlify(parse_csv(str)). Returns a string | File I/O |
csvify | Converts table (Table) to CSV text — exactly write_csv's own formatting (Table::to_csv), just returned as a string instead of written to a file | File I/O |
ctranspose | Conjugate transpose (Hermitian): transpose plus elementwise complex conjugation | Core maths |
cumsum | Returns the running sum, same type/length as x; a Signal input stays a Signal with the same Fs | Collections & strings |
cur_dir | cur_dir says what it gives back and pwd is what anyone who has used a shell types first, so both spellings exist rather than one being renamed out from under existing scripts | File I/O |
curve_fit | Returns a Model (kind "curve_fit") with fields params (a length-P vector), cost (a number, residual sum of squares), converged (a boolean) | Signal processing |
cut | Returns a new Signal at the SAME Fs, shorter than sig | Signal processing |
cv_stability | Repeats cross-validation n_repeats times (integer, default 10) with cv_folds folds each (integer, default 5) on an N-row X and length-N y, reshuffling between repeats | Statistics & ML |
D
daily_profile | Returns a length-7 real vector, one bin per day-of-week -- so a weekday-against-weekend difference separates out | Signal processing |
db | Alias of mag2db(x) above (20*log10(x), amplitude convention) — the bare SciPy/general-DSP-flavored spelling | Signal processing |
db2mag | Returns the same shape: 10^(db/20) — inverse of mag2db | Signal processing |
db2pow | Returns the same shape: 10^(db/10) — inverse of pow2db/db_power | Signal processing |
db_power | Alias of pow2db(x) above (10*log10(x), power convention) — the bare SciPy/general-DSP-flavored spelling | Signal processing |
dbfs | Peak level relative to full scale: 20*log10(peak(abs(x)) / full_scale) | Core maths |
dbscan | Density-based clustering on an N-row, D-column data matrix X: a number eps (the neighbourhood radius, in X's own units) and an integer min_samples (the minimum neighbourhood.. | Statistics & ML |
dct | Returns a length-N real vector | Signal processing |
dec2bin | Returns a Str of 0/1 digits, no prefix | Collections & strings |
dec2hex | Returns a Str: uppercase hex digits, no prefix | Collections & strings |
delay | Returns the SAME length as x, shifted later by n with the vacated head zero-filled and whatever runs off the end dropped | Signal processing |
delta_e | Compares colours a and b (each any accepted colour string) in CIE76 Lab space and returns a single number: the perceptual distance | Plotting |
dense | One fully-connected layer on an N-row, D-column input matrix x, a (D, H) weight matrix w, and a length-H bias vector b: computes x * w + b, broadcasting b over every row | Statistics & ML |
dense_layer | Builds one unfitted dense-layer spec: in_dim/out_dim (positive integers) the layer's input and output widths, activation a string, "relu" or "none" (default "none", a bare.. | Statistics & ML |
describe | Pandas-style describe(): returns a Table with one row per summary statistic (count, mean, std, min, 25%, 50%, 75%, max) and one column per NUMERIC column of df (text.. | Collections & strings |
det | Determinant of a square Mat or CMat, via LU decomposition | Core maths |
detect_saturation | Has x hit the rails of an adc_bits-bit converter: the clipping question for a converter whose range is *known* rather than inferred, so no flat run is required and a single sample.. | Signal processing |
detrend | Subtracts a least-squares polynomial trend from x, a length-N number vector | Noise |
device_used | Returns a struct-like value with two fields: .device (a string, e.g. "cpu" or a GPU device name) and .gpu_dispatches (a number, the count of operations actually dispatched to the GPU) | REPL & diagnostics |
dft | Returns a length-N CVec. The direct, textbook O(n²) transform, kept as an independent reference implementation to validate fft against and as the definitional basis goertzel.. | Signal processing |
diag | Overloaded on argument type: diag(M), where M is an r×c Mat, returns its main diagonal as a length-min(r,c) Vec; diag(v), where v is a length-n Vec (or scalar/other.. | Core maths |
dict | Returns a Dict, insertion-ordered | Collections & strings |
diff | Returns the first difference (x[i+1] - x[i]), length N-1, same base type as x; a Signal input stays a Signal with the same Fs | Collections & strings |
dir | The bare names inside path (a Str), sorted — "a.qu", not "tools/a.qu" | File I/O |
dir_exists | Whether path (a Str) exists and is a regular file / a directory | File I/O |
disp | Writes its arguments, space-separated, and a newline, to stdout | Collections & strings |
distinct | Returns the same type: the unique values, in the order they first appear — which unique does not promise, since it sorts | Collections & strings |
distort | Put the signal through a nonlinearity: clip, soft, crossover, harmonic, quantize | Noise |
div | The operators as named functions, so an operation can be passed where a name is what you can pass | Core maths |
dominant_frequency | Returns a single number: the frequency of the largest non-DC bin in x's one-sided spectrum, accurate to the bin's own resolution fs/N | Signal processing |
donut | Pie chart with a hollow center | Plotting |
dot | Dot product of two equal-length vectors a, b (each a Vec; a length mismatch errors) | Core maths |
double_buffer | Returns a double_buffer handle; front AND back both start equal to initial | Collections & strings |
drop | Returns the same type as xs: the first n elements (take) or everything after them (drop) | Collections & strings |
drop_row | Returns a Table without those rows, by position | Collections & strings |
dropout | Zeroes a random share of the entries of x (a vector or matrix of any shape) at probability rate (a number in [0, 1)), and scales the surviving entries up by 1 / (1 - rate), so the.. | Statistics & ML |
dropout_layer | Builds one unfitted dropout-layer spec for use inside a sequential stack: rate a number in [0, 1), the fraction of activations to zero during training | Statistics & ML |
duty_cycle | Returns a single number: mean high time over mean period, as a fraction in [0, 1], not a percentage — multiply by 100 for the figure a scope's front panel shows | Signal processing |
dwt | Returns a (2, N/2) matrix — row 0 is the approximation band, row 1 is the detail band (Qu has no multi-return) | Signal processing |
E
ecdf | Empirical cumulative distribution, one staircase per argument | Plotting |
echo | Writes its arguments, space-separated, and a newline, to stdout | Collections & strings |
eda | One-call exploratory overview: a correlation heatmap in the first grid cell, plus one histogram per numeric column in the remaining cells, auto-gridded (ceil(sqrt(n)) columns for n.. | Plotting |
edge_detect | Applies a fixed 3x3 discrete Laplacian edge filter, highlighting intensity discontinuities | Images |
eig | Eigenvalues (and, for symmetric A, real eigenvectors) of a square n×n Mat A | Core maths |
elapsed | Returns a number: elapsed seconds so far | REPL & diagnostics |
elediv | The .*, ./ and .^ family: always elementwise, whatever the shapes | Core maths |
elemul | The .*, ./ and .^ family: always elementwise, whatever the shapes | Core maths |
elepow | The .*, ./ and .^ family: always elementwise, whatever the shapes | Core maths |
ellip | Returns a Model (kind "filter", field sos) | Signal processing |
ellipse | Draws an ellipse centered at (cx, cy) (numbers) with semi-axis radii rx and ry (numbers, data units along x and y respectively) | Plotting |
emd | Empirical Mode Decomposition: splits x into oscillatory intrinsic mode functions (IMFs, highest frequency first) plus a residual trend, via the standard sifting algorithm | Signal processing |
emf | Adds simulated switching/EMI interference to x, a length-N signal vector, given the sample rate fs in Hz: an amplitude-modulated carrier plus damped bursts at each switching edge | Noise |
ends_with | Returns a bool: true if s ends with suffix | Collections & strings |
energy | Returns a single number, sum(x.^2) — total signal energy | Signal processing |
enob | Returns a single number, bits — effective number of bits, inverting 6.02·bits + 1.76 on the measured SINAD | Signal processing |
enob_estimate | Returns a single number, bits — effective number of bits, inverting 6.02·bits + 1.76 on the measured SINAD | Signal processing |
enum_values | Returns a List of EnumVals: every variant of the declared type, in declaration order — makes the type a real enumeration rather than just a handful of named constants, and lets code.. | Collections & strings |
eof | Checks whether f (file handle, opened readable) has any bytes left to read from the current position | File I/O |
erf | The error function and its complement (erfc(x) = 1 - erf(x), computed directly rather than by subtraction so it stays accurate for large x, where erf(x) itself has already saturated.. | Core maths |
erfc | The error function and its complement (erfc(x) = 1 - erf(x), computed directly rather than by subtraction so it stays accurate for large x, where erf(x) itself has already saturated.. | Core maths |
error | Never returns normally — control passes to the nearest enclosing try/catch, where the caught exception object exposes the string as .message; uncaught, it aborts the script | REPL & diagnostics |
errorbar | Draws one capped whisker plus a marker per sample: x, y, yerr are equal-length numeric Vecs, yerr the (symmetric) half-height of each whisker in data units | Plotting |
estimate | Estimation-family only: reads a point estimate off a filter state Record state with no arguments | Statistics & ML |
estimate_complexity | Takes two same-length numeric vectors/lists: sizes (the problem sizes swept over) and times (the matching elapsed times in seconds, e.g. from toc() at each size) — at least 3 matching.. | REPL & diagnostics |
estimate_frequency | Returns a single number: the frequency of the largest non-DC bin in x's one-sided spectrum, accurate to the bin's own resolution fs/N | Signal processing |
exec | Runs program (a Str) and waits, capturing what it printed | File I/O |
exp | Returns exactly the same type and shape as x | Core maths |
exp2 | Returns exactly the same type and shape as x | Core maths |
explain | The report says whether that function is running the fast register-only ("soft-compiled") tier or falls back to the ordinary tree-walking interpreter, and — when interpreted — which.. | REPL & diagnostics |
explore | Writes a self-contained HTML page to path (string) with one slider per parameter of function "fn" (string) | Plotting |
expm1 | e^x - 1, computed so it stays accurate for x near zero (expm1(1e-15) does not lose precision to the cancellation that exp(x) - 1 would hit there) | Core maths |
exponential | Exponential draws. rate (a positive number) is the rate, not the scale: the mean is 1/rate, and NumPy instead takes scale = 1/rate directly, so a value copied from NumPy needs.. | Statistics & ML |
eye | The n×n identity matrix (ones on the diagonal, zeros elsewhere) | Core maths |
F
f1 | Classification metrics on a length-N vector of true labels actual and a length-N vector of predicted labels predicted, each returning a single number macro-averaged over every class.. | Statistics & ML |
fall_time | Returns a single number: the transition time of the first complete rising (resp | Signal processing |
fft | On the FULL (two-sided) spectrum this returns, a real tone occupies TWO conjugate-symmetric bins, and scaling makes each of them independently read the tone's full peak amplitude (or RMS).. | Signal processing |
fftc | rfft returns a length-floor(N/2)+1 complex vector, the one-sided half-spectrum; fftc returns a length-N complex vector, the full spectrum | Signal processing |
fftr | Deprecated — use irfft. The same function under a name that reads as rfft's forward partner; it is actually rfft's inverse, so the pair reads backwards | Signal processing |
fifo | Returns a fifo handle: a new, empty ring buffer | Collections & strings |
figure | Clears/resets the whole figure (all panels), starting a fresh one | Plotting |
figure_background | Sets the current figure's SVG background fill to color (string: "#rrggbb" hex or a CSS named colour; default "#ffffff"), passed straight through, unparsed | Plotting |
figure_size | Sets canvas size either from w, h (numbers, raw units) or from a named journal-column preset string (e.g. "ieee1") | Plotting |
file_exists | Whether path (a Str) exists and is a regular file / a directory | File I/O |
file_size | Reports a file's size without opening it | File I/O |
fill_between | A filled band between two curves: x, y_lo, y_hi are equal-length numeric Vecs giving the lower and upper boundary at each x, e.g. a confidence interval | Plotting |
fill_missing | x with the missing samples patched, same length, so a Signal keeps its Fs | Noise |
filter | Returns a Table containing only the rows where mask is true | Collections & strings |
filter_ba | Returns a same-length vector or Signal | Signal processing |
filter_init | Returns a Model (kind "filter_state") holding fresh all-zero streaming state for sample-at-a-time filtering: field is an (n_sections, 2) biquad-state matrix for an IIR (sos) filter,.. | Signal processing |
filter_next | Returns a new "filter_state" Model (field y, a number, holds the filtered output) | Signal processing |
filtfilt | Returns a same-length vector or Signal, same Fs-preserving convention as sosfilt | Signal processing |
find | One argument: identical to where(mask) — the indices where a boolean mask is true, as a Vec | Core maths |
find_clipping | Same detection as is_clipped, same keywords, but returns *where* | Signal processing |
find_edges | The reported positions are taken at level either way, so switching hysteresis on to reject glitches does not move the measurements it protects | Signal processing |
find_missing | The indices of the missing samples, as a number vector | Noise |
find_outliers | The indices of the samples a criterion flags, as a number vector (same shape of answer as find_peaks) | Noise |
find_peaks | Kwarg names match SciPy; the original min_height/min_distance/min_prominence names are still accepted as aliases | Signal processing |
find_pulses | Returns a Model (kind "pulses") with fields starts, stops (vectors of integer sample indices — stops, not ends, because end is a Qu keyword), widths (a vector of times:.. | Signal processing |
find_trigger | Returns a vector of 0-indexed integer sample indices, one per crossing, each being the first sample of the new state — a rising crossing at i means x[i-1] < level <= x[i] | Signal processing |
find_zero_crossings | find_trigger at level zero. The default is both directions, unlike find_trigger's own default: the zero-crossing rate is a count of every sign change, so len(find_zero_crossings(x)).. | Signal processing |
findpeaks | MATLAB-style [peaks, locations] = findpeaks(x, ...) | Signal processing |
fir1 | Returns a Model (kind "filter", field b, a length-n+1 vector) | Signal processing |
firls | Returns a Model (kind "filter", field b, a length-n+1 vector) | Signal processing |
first | Returns the first (first) or last (last) element (same element type as xs holds), or none when xs is empty | Collections & strings |
fit | Runs a pipeline Record pipe (from pipeline(...)) on an N-row feature matrix X and a length-N target vector y: applies every transform stage in order, then calls the final.. | Statistics & ML |
fit_scaler | Fits and stores scaling parameters from an N-row, D-column matrix (or vector, or table) X, for reuse on new data — the fit-once path, as opposed to the four one-shot verbs above | Statistics & ML |
flatten | Returns a flat List: one level of nesting removed | Collections & strings |
flip | Reverses row order (flipud, dim=1) or column order (fliplr/mirror, dim=2) of A, a Str, Vec, Mat, or Image | Core maths |
fliplr | Reverses row order (flipud, dim=1) or column order (fliplr/mirror, dim=2) of A, a Str, Vec, Mat, or Image | Core maths |
flipud | Reverses row order (flipud, dim=1) or column order (fliplr/mirror, dim=2) of A, a Str, Vec, Mat, or Image | Core maths |
floor | Standard rounding functions, elementwise: floor toward negative infinity, ceil toward positive infinity, round to the nearest integer (half away from zero) | Core maths |
fold | Returns the final accumulated value (whatever type f produces) | Collections & strings |
fontfamily | Sets the figure-wide font (string name, inherited by every title/label/tick/legend) | Plotting |
fontsize | A bare number n scales tick/label/title text together (in points); named arguments tick=, label=, title= (each a number, points) override each independently (and win over the.. | Plotting |
fopen | Opens a file for reading, writing, or appending | File I/O |
foreground_mask | Thresholds img at level, then applies imopen(radius) to remove noise specks | Images |
format | Interpolation ({x:.2f}) reads better inline; format is for a pattern held in a variable | Collections & strings |
forward | Runs the forward algorithm on an hmm model hmm for a length-T integer observation-symbol sequence obs (each entry a 0-based column index into emission) | Statistics & ML |
freqz | Returns a length-n complex vector (CVec), the response H(e^{jω}) at n points from DC to Nyquist inclusive | Signal processing |
fvtool | MATLAB's Filter Visualization Tool: a 2x2 figure (magnitude response in dB, phase, group delay, impulse response) built from freqz/group_delay/sosfilt | Signal processing |
fzero | Returns a single number, the root | Signal processing |
G
gain | Returns the same shape as x, scaled by 10^(db/20) — the AMPLITUDE convention, the same factor of 20 as db2mag | Signal processing |
gamma | The gamma function (gamma(n) = (n-1)! for a positive integer n) and its natural log (lgamma(x) = ln|gamma(x)|) | Core maths |
generate | Runs greedy (argmax, no sampling knobs, no temperature) text completion on a model handle model from llm_load, given a string prompt and an integer cap max_tokens (default 64) on.. | Statistics & ML |
gerischer | Zg/sqrt(k + jw) — a coupled chemical reaction | Signal processing |
get | get returns the stored value (any type) or none if key is absent | Collections & strings |
getenv | Reads one environment variable | File I/O |
glob | Every file matching a whole-path wildcard, as full paths, sorted — never a directory, which is what makes the content and size filters mean something on every entry | File I/O |
gmm_model | Gaussian mixture model with k components fitted by EM on an N-row, D-column matrix X, warm-started from a k-means run (optional integer seed=, and max_iter capping the EM.. | Statistics & ML |
goertzel | Returns a single complex scalar for a scalar k, or a length-K CVec for a vector — the K-point DFT this is named for: K arbitrary points in O(n·K), each independently, instead of every.. | Signal processing |
goertzel_freq | Returns a single complex scalar or a length-K CVec, same batching as goertzel above | Signal processing |
gpu_matmul | WebGPU-accelerated matmul via qu-gpu, same A/B shape requirements and r×c Mat return as matmul; only present in builds compiled with --features gpu | Core maths |
gpu_probe_info | Returns a struct-like value with three fields: .available (a boolean, whether a GPU backend was found), .crossover (a number, the measured matrix/problem size above which the GPU wins.. | REPL & diagnostics |
grad | Takes loss — a tracked scalar that is the result of a computation built from tracked inputs — plus either a keyword argument wrt=X (one tracked tensor X) or one or more positional.. | REPL & diagnostics |
gradient_boosting_model | Regression-only boosted ensemble on an N-row, D-column X and length-N y: n_trees (positive integer) shallow trees fitted in sequence, each to the running residual, scaled by.. | Statistics & ML |
graph | Optional named directed (bool, default false) | Collections & strings |
grayscale | Converts RGB → luma via ITU-R BT.601 weights (matches plotting.rs's contrast_text_color) | Images |
grep | Returns a List of the matching (or non-matching) LINES — regex_find_all returns the matched substrings themselves, a different thing | Collections & strings |
grid | Calling grid(...) as a function is accepted but is a no-op — only the bare command form actually changes anything | Plotting |
gridworld_env | Builds an n x n grid environment (integer n), with start/goal (optional integer state indices, defaulting to opposite corners), step_reward (number, default -1, given on every.. | Statistics & ML |
group_by_agg | Returns a Table: one row per distinct value of group_col, with value_col aggregated | Collections & strings |
group_delay | Returns a length-n real vector, -dφ/dω in samples, same n-point/frequency-axis convention as freqz | Signal processing |
groupbar | Grouped (side-by-side) bar chart: x (Vec, category positions) and y (Mat or list of Vecs, one series per group of bars) | Plotting |
gru_cell | One GRU timestep: x_t (length-input_size input vector), h_prev (length-hidden_size previous hidden state), weights (a Record with the nine gate fields gru_init produces) | Statistics & ML |
gru_forward | Unrolls gru_cell over a whole sequence: x_sequence an (input_size, seq_len) matrix, h0 a length-hidden_size initial hidden state, weights the same Record gru_cell takes | Statistics & ML |
gru_init | Builds fresh GRU weights for an input of size input_size (integer) and a hidden state of size hidden_size (integer): Xavier-scaled weight matrices and zero biases for the update, reset.. | Statistics & ML |
H
hamming | Returns a length-n real vector | Signal processing |
hampel | Outlier removal: replaces a sample by the local median only when it is more than n_sigma robust deviations (1.4826 × MAD) from it | Noise |
hann | Returns a length-n real vector | Signal processing |
has_edge | has_edge(g, a, b) returns a bool; neighbors(g, name) returns a List of Str node ids | Collections & strings |
has_key | Returns a bool: whether the dict has that key, without reading it | Collections & strings |
havriliak_negami | Rh/(1 + (jw tau)^a)^g | Signal processing |
head | Returns the first (head) or last (tail) n elements/rows, same type as s | Collections & strings |
heatmap | Grid of colored cells: matrix is a Mat, each cell coloured by its own value scaled to the matrix's own min/max | Plotting |
help | Prints what is known about that name directly to the console and returns none — that it exists, near matches when it does not (e.g. help("not_a_real_fn") suggests close spellings), and.. | REPL & diagnostics |
hex2dec | Reads a hexadecimal digit string as a number | Collections & strings |
hexbin | The plane tiled with hexagons, each shaded by how many points fell in it — for the case a scatter cannot do, where past a few thousand marks the picture saturates into a blob | Plotting |
hilbert | Returns a length-N complex vector (CVec), the analytic signal x + j*H[x] | Signal processing |
hist | Bins samples (Vec of numbers) into equal-width buckets and renders as bars; bins (integer, positional or bins= keyword) defaults to ceil(sqrt(n)) for n = len(samples) | Plotting |
histeq | Global histogram equalization: builds a BT.601-luma cumulative distribution and remaps intensities to spread across the full range | Images |
histogram | Bins samples (Vec of numbers) into equal-width buckets and renders as bars; bins (integer, positional or bins= keyword) defaults to ceil(sqrt(n)) for n = len(samples) | Plotting |
hline | Draws a horizontal reference line spanning the whole panel at y (number, data units) | Plotting |
hmm | Builds a discrete hidden Markov model from an (S, S) row-stochastic hidden-state transition matrix transition, an (S, O) row-stochastic emission matrix emission (O the number of.. | Statistics & ML |
hourly_profile | Returns a length-24 real vector, one bin per hour-of-day | Signal processing |
hsl | Builds a colour from hue h (number, degrees, 0–360), saturation s (number, 0–1) and lightness l (number, 0–1, symmetric about 0.5 — "the same colour, lighter" is one number going up) | Plotting |
hstack | Named equivalents of bracket-literal block concatenation ([a, b] horizontally / [a; b] vertically) | Core maths |
hsv | Builds a colour from hue h (number, degrees, 0–360), saturation s (number, 0–1) and value/brightness v (number, 0–1) | Plotting |
html2md | Converts the same subset back to Markdown; malformed HTML degrades to its text rather than erroring | Collections & strings |
http_get | Issues an HTTP(S) GET request and returns the response body as a string (UTF-8, decoded lossily — the same convention read_all_text/text-mode read_all already use) | Concurrency |
huffman_decode | Inverse of huffman_encode: enc is the whole Record that call returned, passed back unchanged; as_str (named boolean, default false) asks for text instead of bytes | File I/O |
huffman_encode | Canonical Huffman coding of data (a Str, or a Vec of 0-255 byte values) | File I/O |
hum | Adds simulated mains pickup to x, a length-N signal vector, given the sample rate fs in Hz | Noise |
hurst_exponent | Returns a single number: 0.5 is a random walk, above that persistent, below it mean-reverting — long-range dependence | Signal processing |
I
idct | Returns a length-N real vector | Signal processing |
identity | The n×n identity matrix (ones on the diagonal, zeros elsewhere) | Core maths |
idft | Returns a length-N CVec. Inverse of dft, same O(n²) direct implementation | Signal processing |
idwt | Returns a length-2N real vector, reconstructing the original signal | Signal processing |
ifft | Inverse DFT, same underlying kernel as fft run in reverse | Signal processing |
im | Imaginary component of a Complex/CVec/CMat (0 elementwise when x is real) | Core maths |
imadjust | MATLAB-style contrast stretch, applied identically and independently to each of R/G/B | Images |
imag | Imaginary component of a Complex/CVec/CMat (0 elementwise when x is real) | Core maths |
image_from_matrix | Builds a grayscale Image directly from matrix, a 2-D Mat of numbers; each value is rounded and clamped to 0–255 and written to R=G=B for that pixel (matrix rows become image rows,.. | Images |
image_new | Creates a blank solid-color canvas | Images |
imagesc | False-color raster display of the plain numeric matrix (no pixel buffer produced) — pushes a dense Heatmap onto the current plot panel, reusing the same renderer as heatmap, just.. | Images |
imbothat | Bottom-hat: imclose(img, radius) - img, extracts small dark features / corrects a slowly-varying dark background | Images |
imclose | Morphological closing (dilate then erode) — fills small background holes without enlarging the overall shape | Images |
imdilate | Performs binary morphological dilation, growing foreground regions | Images |
imequalize | Histogram equalisation, spreading the intensities to fill the range (identical operation to histeq above) | Images |
imerode | Binary morphological erosion — shrinks foreground regions and removes specks smaller than the element | Images |
imfilter | Generic 2-D convolution with edge-clamped borders — the escape hatch when blur/sharpen/edge_detect's fixed kernels aren't enough | Images |
imhist | Computes raw per-bin BT.601-luma intensity counts | Images |
imnoise | For "gaussian": mean/sigma are optional named numbers (defaults 0.0/0.05), the additive per-channel Gaussian noise's mean/standard-deviation in normalized [0,1] intensity units | Images |
imopen | Morphological opening (erode then dilate) — removes specks smaller than the structuring element while leaving larger shapes their size | Images |
impedance | Returns a complex vector, one impedance per frequency | Signal processing |
impedance_from_reflection | Returns z = z0(1 + Γ)/(1 - Γ), the exact inverse | Signal processing |
impulse | Returns a length-n plain vector (not a Signal, since no fs is given — wrap in signal(impulse(n), fs) if a sample rate is needed): a Kronecker delta, all zeros except amplitude at.. | Signal processing |
imrotate | Rotates an image about its own center | Images |
imscale | Implemented as imwarp + affine_scale | Images |
imshow | Places it inline in the current plot panel as a native SVG <image> element at its own resolution | Images |
imtophat | The image minus its opening: what the opening removed | Images |
imtranslate | Implemented as imwarp + affine_translate | Images |
imwarp | Applies M to img in one resampling pass via inverse mapping | Images |
inch | Length units as functions, converting a scalar v (millimetres/centimetres/inches/points as named) to the figure's own coordinate space — a tenth of a millimetre, so mm(1) is 10,.. | Core maths |
index | Returns a Table: t with its row index set to that column, so rows can afterwards be looked up by label | Collections & strings |
index_of | Returns a number (0-based character position of the first occurrence) or none if sub is absent | Collections & strings |
indexof | Returns a number (0-based index of the first match) or Nothing if absent (composes with ??: indexof(xs, v) ?? -1) | Collections & strings |
inductor | jwL | Signal processing |
input | Starts the pipeline sugar: n (a positive integer) is the number of input features | Statistics & ML |
insert | Returns a new Str; s itself is untouched | Collections & strings |
insert_column | Returns a NEW Table; the original is untouched | Collections & strings |
insert_row | Inserts one row into a table at a chosen position | Collections & strings |
interp1 | 1-D interpolation through (x, y) (MATLAB's interp1) | Signal processing |
interp2 | 2-D grid interpolation (MATLAB's interp2): a query exactly at a grid coordinate returns that exact stored value, not an approximation; extrapolation beyond the grid is always on, matching.. | Signal processing |
interpolate_at | A Signal-aware interp1: instead of an explicit x, the signal's OWN implicit time axis (sig.t, i.e. i/Fs) is used as x and sig's samples as y | Signal processing |
interpolate_nan | Exactly fill_missing(x, method="linear") — the same engine, not a second implementation — kept under its own name because that is the operation people go looking for by name | Noise |
inv | True inverse of A (a square Mat or CMat); requires full rank, errors otherwise | Core maths |
inverse_transform | Undoes a fitted scaler Record scaler's transform on an already-scaled matrix/vector/table newX, returning it to the original units | Statistics & ML |
iqr | Interquartile range: percentile(x,75) - percentile(x,25) — a spread measure robust to outliers, unlike std/var | Core maths |
irfft | Inverse of rfft. half_spectrum is a length-floor(n/2)+1 complex vector (CVec); n (required number), the real output length, can't be recovered from the half-spectrum's length.. | Signal processing |
is_clipped | Returns a Bool: does x contain a flat run at an extreme | Signal processing |
is_empty | Whether the fixed-capacity ring buffer q (a Fifo handle created by fifo(capacity)) currently holds nothing, or has no room left for another push without evicting the oldest element | Core maths |
is_full | Whether the fixed-capacity ring buffer q (a Fifo handle created by fifo(capacity)) currently holds nothing, or has no room left for another push without evicting the oldest element | Core maths |
is_stable | Returns a boolean, true iff every pole lies strictly inside the unit circle — the standard causal-LTI stability criterion | Signal processing |
items | Returns a List: its keys (keys), its values (values), or (key, value) tuples (items) — insertion order, not sorted | Collections & strings |
J
join | Two unrelated forms selected by the argument's type | Concurrency |
js_exec | Runs code (string, source in the guest language) as a subprocess | File I/O |
json2csv | str (string, JSON text) is converted to CSV text: exactly csvify(parse_json(str)). Returns a string | File I/O |
json2xml | str (string, JSON text) is converted to XML: exactly xmlify(parse_json(str)). Returns a string | File I/O |
jsonify | Converts any value (any Value — number, string, Vec, Table, Record, ...) to a JSON string — exactly the save/load on-disk shape (see the link above: a {"type": ..., ...}.. | File I/O |
K
k_fold | Splits an N-row feature matrix X and a length-N target vector y into an integer number of folds cross-validation folds | Statistics & ML |
kaiser | Returns a length-n real vector, w[i] = I0(beta*sqrt(1-((2i/(n-1))-1)^2)) / I0(beta) | Signal processing |
kalman_init | Initial linear-Kalman state: x0 a length-D initial state estimate vector, P0 a (D, D) initial covariance matrix | Statistics & ML |
kapur_threshold | Same "compute, don't apply" shape as otsu_threshold, but using Kapur's entropy-maximizing criterion instead of Otsu's between-class variance — tends to handle unequal class sizes better | Images |
keys | Returns a List: its keys (keys), its values (values), or (key, value) tuples (items) — insertion order, not sorted | Collections & strings |
kmeans | Lloyd's algorithm on an N-row, D-column data matrix X, partitioning it into the integer number of clusters k, starting from randomly chosen initial centroids (an optional integer.. | Statistics & ML |
kmeans_centers | The same Lloyd's-algorithm run as kmeans on X/k/seed=, returning the (k, D) centroid matrix instead of the labels | Statistics & ML |
kmeans_model | k-means as a reusable handle: fits on an N-row, D-column matrix X into k clusters (optional integer seed=), so .predict(Xnew) later assigns new rows to the nearest centroid.. | Statistics & ML |
kmedians_model | The outlier-resistant sibling of kmeans_model, same X/k/seed= shape: clusters by L1 distance around coordinate-wise median centres instead of means | Statistics & ML |
kmedoids_model | PAM clustering on the same X/k/seed= shape as kmeans_model — every one of the k centres is an actual row of X, never an average | Statistics & ML |
knn_model | k-nearest-neighbours on an N-row, D-column X and a length-N target y, with integer neighbour count k, an optional metric string (distance function name), and kind.. | Statistics & ML |
kurtosis | Fourth standardized moment, population form, of a length-N numeric vector x | Statistics & ML |
L
lab | Builds a colour from CIE L\*a\*b\* coordinates: L (number, lightness, 0–100), a and b (numbers, roughly -128..127, green–red and blue–yellow axes) | Plotting |
label_blobs | Connected-component labelling: every separate region gets its own integer (identical operation to bwlabel above) | Images |
last | Returns the first (first) or last (last) element (same element type as xs holds), or none when xs is empty | Collections & strings |
last_index_of | Returns a number (0-based character position of the last occurrence, searching from the end) or none if absent — so a miss cannot be mistaken for a position | Collections & strings |
layer_norm | Normalizes each row of an N-row, D-column matrix x independently to zero mean and unit variance, then applies a learned length-D per-feature scale gamma and shift beta, with.. | Statistics & ML |
lcase | BASIC's names for upper/lower; toupper/tolower are C's names for the same thing | Collections & strings |
least_squares | Nonlinear least squares on a residual function you named, via Levenberg-Marquardt | Core maths |
left | The first n characters of a string | Collections & strings |
legend | Shows or hides the key for the current panel | Plotting |
len | Returns a number: the current element count (via the same generic length dispatch every collection uses) | Collections & strings |
length | Total element count of x: 1 for a scalar, its length for a Vec/CVec/Signal, rows*cols for a Mat, a Unicode-aware character count for a Str, and the element/node count for.. | Core maths |
lfilter | Returns a same-length vector or Signal | Signal processing |
lgamma | The gamma function (gamma(n) = (n-1)! for a positive integer n) and its natural log (lgamma(x) = ln|gamma(x)|) | Core maths |
like | BASIC's wildcard match, anchored at both ends: * any run, ? any one character, # any digit, [abc]/[!abc] a set | Collections & strings |
lines | Splits on either line ending, with no spurious empty last element when the text ends in a newline | Collections & strings |
linked_list | Returns a linked_list handle: a new, empty double-ended list | Collections & strings |
linspace | Returns a length-n real vector, n linearly spaced points from a to b inclusive — the standard companion for building a time or frequency axis to plot alongside a.. | Signal processing |
list_dir | The bare names inside path (a Str), sorted — "a.qu", not "tools/a.qu" | File I/O |
list_files | Every file matching a whole-path wildcard, as full paths, sorted — never a directory, which is what makes the content and size filters mean something on every entry | File I/O |
listdir | The bare names inside path (a Str), sorted — "a.qu", not "tools/a.qu" | File I/O |
listen_pool | Binds port and blocks forever (this call never returns under normal operation), accepting job requests over TCP and running only functions named in allow | Concurrency |
llm_load | Loads a chat model, identified by name: a string, either a bundled name like "tinyllama" or a local filesystem path to a .gguf weights file with a tokenizer.json beside it | Statistics & ML |
ln | Natural logarithm, elementwise (log is an alias for ln — it is not base-10; see log10 for that) | Core maths |
load | Restores every variable a save/save_all call wrote | File I/O |
load_image | Reads the file from disk and decodes it — PNG and BMP | Images |
load_model | Reads a model previously written by save_model back from the HDF5 file at the string path | Statistics & ML |
log | Natural logarithm, elementwise (log is an alias for ln — it is not base-10; see log10 for that) | Core maths |
log10 | Base-10 / base-2 logarithm, elementwise, same domain behavior as ln on a non-positive element | Core maths |
log1p | ln(1 + x), computed so it stays accurate for x near zero (log1p(1e-15) does not underflow to exactly 0, unlike naively computing 1.0 + x first) | Core maths |
log2 | Base-10 / base-2 logarithm, elementwise, same domain behavior as ln on a non-positive element | Core maths |
logistic_model | Binary logistic regression on an N-row, D-column X and a length-N 0/1 target y | Statistics & ML |
loglog | Plots equal-length numeric Vecs x, y like plot and additionally sets both axes to log scale | Plotting |
logspace | Returns a length-n real vector, n logarithmically spaced points, 10^linspace(a, b, n) — used for frequency axes in Bode-style plots and rLKK's default DRT grid | Signal processing |
logsumexp | Numerically stable log(sum(exp(x))), via the usual max-shift so a large input can't overflow exp | Core maths |
lower | Unicode-aware lowercase conversion | Collections & strings |
lr_adaptive | Learning-rate controllers that wrap a base optimizer rather than replacing it: lr= the starting learning rate (number), patience an integer number of epochs to wait for improvement.. | Statistics & ML |
lr_plateau | Learning-rate controllers that wrap a base optimizer rather than replacing it: lr= the starting learning rate (number), patience an integer number of epochs to wait for improvement.. | Statistics & ML |
lse | Numerically stable log(sum(exp(x))), via the usual max-shift so a large input can't overflow exp | Core maths |
lstm_cell | One LSTM timestep: x_t (length-input_size input vector), h_prev/c_prev (length-hidden_size previous hidden/cell state vectors), and weights (a Record with the twelve gate fields.. | Statistics & ML |
lstm_forward | Unrolls lstm_cell over a whole sequence: x_sequence an (input_size, seq_len) matrix (one column per timestep), h0/c0 length-hidden_size initial states, weights the same.. | Statistics & ML |
lstm_init | Builds fresh LSTM weights for an input of size input_size (integer, number of features per timestep) and a hidden state of size hidden_size (integer): Xavier-scaled weight matrices and.. | Statistics & ML |
ltrim | Same parameters as trim, restricted to one end only (ltrim the left, rtrim the right) | Collections & strings |
lu | LU decomposition with partial pivoting of a square n×n Mat A, P·A = L·U | Core maths |
M
mae | The regression-error trio, each taking a length-N vector of true values actual and a length-N vector of predictions predicted, and returning a single number: mae the mean absolute.. | Statistics & ML |
mag2db | Returns the same shape: 20*log10(x) | Signal processing |
make_file | Creates an empty file at path (a Str), truncating it if it is already there — the same promise fopen(path, "w") makes, so the two agree | File I/O |
map | Returns a List: f applied to every element | Collections & strings |
markov_chain | Builds a discrete Markov chain from an (S, S) row-stochastic transition matrix P (every row must sum to 1 — rows that don't are rejected outright, never quietly renormalized) and an.. | Statistics & ML |
matlab_exec | The same contract as python_exec/js_exec, run through a local MATLAB installation instead: code's result is written to an injected qu_output_path variable (no leading underscore —.. | File I/O |
matmul | Matrix multiplication of A (r×k) and B (k×c), both Mat (inner dimensions must agree) | Core maths |
max | In the one-argument form on a Mat, the optional axis= keyword (0 or 1) reduces along just that dimension instead, returning a length-cols/rows Vec rather than a single scalar | Core maths |
maxpool2d | Downsamples an (H, W) matrix x by taking the largest value in each size x size window (integer size), moving stride positions at a time (integer, defaults to size —.. | Statistics & ML |
md2html | Converts headings, paragraphs, lists, fenced code with its language, blockquotes, pipe tables, rules, and inline code/bold/italic/links/images | Collections & strings |
mean | Arithmetic mean of every element of x — a scalar, Vec, or Mat/Signal | Core maths |
measure_snr | Computes the achieved signal-to-noise ratio by treating noisy - clean as the noise | Noise |
medfilt | Replaces each sample by the median of window samples centred on it | Noise |
medfilt2 | Synonyms for medfilt at the Qu level: x is a length-N number vector or an Image, window an optional positional/named odd integer, default 3 | Noise |
median | Middle order statistic of x (a scalar, Vec, or Mat/Signal, flattened): the middle element for an odd-length input, the average of the two middle elements when len(x) is even | Core maths |
median_filter | Synonyms for medfilt at the Qu level: x is a length-N number vector or an Image, window an optional positional/named odd integer, default 3 | Noise |
mem_usage | Returns this process's resident-set size right now, in bytes (a Num) — what THIS run has actually mapped in, not the machine's total memory (sysinfo()'s job) | Concurrency |
meshgrid | The two coordinate matrices a surface or contour needs, from two axis vectors x (length nx) and y (length ny) | Core maths |
mid | Plain aliases of the same implementation (mid exists purely for BASIC/Excel discoverability) | Collections & strings |
min | In the one-argument form on a Mat, the optional axis= keyword (0 or 1) reduces along just that dimension instead, returning a length-cols/rows Vec rather than a single scalar | Core maths |
minimize | Returns a Model (kind "minimize") with fields params (length-P vector), value (a number), converged (a boolean) | Signal processing |
minutely_profile | Returns a length-60 real vector | Signal processing |
mirror | Reverses row order (flipud, dim=1) or column order (fliplr/mirror, dim=2) of A, a Str, Vec, Mat, or Image | Core maths |
mismatch_loss | Returns -10 log10(1 - |Γ|²) in dB: the incident power not delivered to the load | Signal processing |
mkdir | Creates the directory path (a Str), including any missing parents — mkdir -p, not bare mkdir | File I/O |
mlp_classifier | Shortcut that builds a dense_layer(..., activation="relu") for every size in hidden_dims (a vector of positive integers, e.g. [64, 32]) followed by a final dense_layer(...,.. | Statistics & ML |
mm | Length units as functions, converting a scalar v (millimetres/centimetres/inches/points as named) to the figure's own coordinate space — a tenth of a millimetre, so mm(1) is 10,.. | Core maths |
mmap_len | Reports the mapped file's size | File I/O |
mmap_open | Memory-maps path (string, filesystem path) read-only | File I/O |
mmap_read | Reads a byte range out of a mapping without moving any cursor | File I/O |
mod | Returns a number: the remainder with the sign of the divisor, so -1 mod 3 is 2 rather than -1 | Collections & strings |
mode | The most frequent value in a numeric or categorical vector x of length N | Statistics & ML |
monte_carlo | Returns a length-n vector collecting every result | Signal processing |
monthly_profile | Returns a length-12 real vector, one bin per equal-width twelfth of a Julian year | Signal processing |
move | Exactly predict(dt) on a kind="particle_tracker" state — the row above — under a verb that says what the step is: for this filter the predict step really is a concrete constant-velocity.. | Statistics & ML |
move_file | Moves src to dst, falling back to copy-then-remove-the-original when a plain rename fails (e.g. across drives) — the on_exists collision check happens first either way, so the.. | File I/O |
mse | The regression-error trio, each taking a length-N vector of true values actual and a length-N vector of predictions predicted, and returning a single number: mae the mean absolute.. | Statistics & ML |
mtimes | Matrix multiplication of A (r×k) and B (k×c), both Mat (inner dimensions must agree) | Core maths |
mul | The operators as named functions, so an operation can be passed where a name is what you can pass | Core maths |
multi_head_attention | Runs several attention heads over the same (N, D) input x in parallel: heads is a tuple of n_heads (integer) Records, each with fields wq, wk, wv (per-head projection.. | Statistics & ML |
multi_otsu | The n_classes - 1-threshold generalization of otsu_threshold | Images |
multisine | Returns a length-n Signal. Sum of cosines at the given frequencies/amplitudes | Signal processing |
multithreshold | Quantizes into len(levels)+1 bands at the given cut points | Images |
mutex | Creates a shared mutable cell holding initial (any value, of any type — the mutex has no fixed element type) | Concurrency |
mutex_add | Atomic read-modify-write in a single lock acquisition (unlike mutex_set(m, mutex_get(m) + delta), which would race) | Concurrency |
mutex_get | Reads the current value out of mutex handle m | Concurrency |
mutex_set | Overwrites the value stored in mutex handle m with v (any value, any type), discarding the old one unconditionally — no read of the previous value is involved | Concurrency |
mutex_update | Atomic read-modify-write via an arbitrary user function called with the current value as its one argument — for accumulations mutex_add can't express (a running max, an append-only log) | Concurrency |
mutual_info_classif | k-nearest-neighbour mutual information between each column of an N-row, D-column X and a length-N discrete label vector y, using k neighbours (integer, default 3) | Statistics & ML |
mvnpdf | Multivariate Gaussian density at a length-D point x, with a length-D mean vector mu and a (D, D) covariance matrix Sigma, evaluated through Sigma's Cholesky factor rather than.. | Statistics & ML |
N
nadam | The Adam family of per-parameter adaptive-learning-rate optimizers, given params (a Tensor to optimize) and a learning rate lr (a number, default 0.001) | Statistics & ML |
naive_bayes_model | Gaussian naive Bayes classifier on an N-row, D-column X and a length-N categorical/integer target y, scored in log space so a product of small per-feature densities cannot.. | Statistics & ML |
nand | Returns a bool: logical NAND | Collections & strings |
ncol | Returns a number: the column count | Collections & strings |
neighbors | has_edge(g, a, b) returns a bool; neighbors(g, name) returns a List of Str node ids | Collections & strings |
nesterov_sgd | Plain stochastic gradient descent (sgd) and its look-ahead variant (nesterov_sgd, which evaluates the gradient after applying the momentum step rather than before it), given params (a.. | Statistics & ML |
newton | Returns a single number, the root | Signal processing |
nnls | Non-negative least squares by Lawson-Hanson, for when a negative coefficient would be physically meaningless — a concentration, a mass, a relaxation strength | Core maths |
nor | Returns a bool: logical NOR | Collections & strings |
norm | Euclidean (L2) norm; for a matrix this is the Frobenius norm (every element treated as one long vector), not a matrix operator norm | Core maths |
normal | Draws from a Gaussian. mu (number) is the mean; sigma (number) is the standard deviation; rows and cols (numbers, optional) give the shape of the draw, one number for a vector and.. | Statistics & ML |
normalize | Min-max scaling of X (a vector, an N-row/D-column matrix scaled column-wise, or a table scaled per numeric column) to [0, 1]: (x - min) / (max - min) | Statistics & ML |
normpdf | Gaussian probability density at x (a number or vector, elementwise) with mean mu (default 0) and standard deviation sigma (default 1) | Statistics & ML |
now | Returns the current time (UTC) as a Record with integer fields .year, .month, .day, .hour, .minute, .second, plus .unix (number, Unix epoch seconds, for arithmetic) and.. | Concurrency |
nrow | Returns a number: the row count | Collections & strings |
numel | Total element count of x: 1 for a scalar, its length for a Vec/CVec/Signal, rows*cols for a Mat, a Unicode-aware character count for a Str, and the element/node count for.. | Core maths |
nyquist | The standard EIS plot: Re(Z) on x, -Im(Z) on y (the impedance-spectroscopy sign convention every EIS instrument uses, so capacitive/inductive behavior plots in the upper half-plane) | Signal processing |
O
ols_model | Fits ordinary least squares with an automatic intercept on an N-row, D-column feature matrix X and a length-N target vector y | Statistics & ML |
ones | A vector or matrix of ones, with the same one-argument-vs-two-argument shape rules as zeros above | Core maths |
ones_like | A vector or matrix of the same shape as x (a Vec or Mat), filled with one or zero respectively — the shape is read directly from x, so it cannot fall out of step with it | Core maths |
optimizer_step | One optimizer update, for when you are writing the training loop yourself instead of calling train_loop: opt an optimizer Record (from sgd/adam/etc.), grads the gradient value.. | Statistics & ML |
or | Returns a bool. Both short-circuit: the right side is not evaluated when the left already decides the answer, so i < len(xs) and xs[i] > 0 is a safe guard | Collections & strings |
ord | Returns a one-character Str from chr, and a number — the code point — from ord | Collections & strings |
otsu | Compute-and-apply convenience: otsu_threshold followed immediately by threshold in one call | Images |
otsu_threshold | Computes (does not apply) the classic Otsu optimal threshold from x's histogram (Image reads per-pixel luma; Vec/Signal read their own values) | Images |
overshoot | Returns a single number, a percent of the step's own size abs(final - initial): overshoot is how far the response travels *past its settled value* in the direction the step was going,.. | Signal processing |
P
pad_left | Pads on the left to width characters; a string already that wide is returned unchanged, never truncated | Collections & strings |
pad_right | Same parameters and return as pad_left, padding on the right instead | Collections & strings |
palette | Generates n (integer) categorical colours of equal perceptual weight by walking hue at fixed saturation/value | Plotting |
panel | Selects cell k (integer, 1-based, row-major) of a rows-by-cols (integers) grid as the target for further drawing | Plotting |
parallel | Two or more circuits in parallel; admittances add | Signal processing |
param | Wraps a plain number, vector, or matrix v as a fresh, differentiable Tensor — a new leaf node on the autodiff tape with no inputs of its own, so grad treats it as something to.. | Statistics & ML |
parse_as | scanf backwards: "hello world 12".parse_as("hello world %d") gives 12 | Collections & strings |
parse_csv | Converts str (string, CSV text) to a Table — exactly read_csv's own parsing (Table::from_csv, the headers=true, sep=",", decimal="." defaults; use read_csv on a real file for.. | File I/O |
parse_json | jsonify's inverse. str (string) is JSON text — either a jsonify/save-style {"type": ...} envelope, or ordinary JSON from anywhere else (e.g. an HTTP API response), which is mapped.. | File I/O |
parse_xml | xmlify's inverse. str (string) is XML text in xmlify's own element-naming convention | File I/O |
particle_filter | The specialized constant-velocity tracker: n_particles (integer), initial_state (a length-D position/velocity vector), process_noise/obs_noise (numbers, the built-in noise levels.. | Statistics & ML |
particle_filter_init | Generic particle filter state: x0 a length-D centre vector, n (integer) the particle count scattered around it with spread spread (a number, default 1.0), and an optional integer.. | Statistics & ML |
pause | Freezes the count, keeping the accumulated total so start resumes from where it left off | REPL & diagnostics |
pca | Projects an N-row, D-column matrix X onto its top k principal components (columns mean-centered first) | Statistics & ML |
pca_components | Fits the same PCA as pca on X and k, returning the (k, D) loading matrix instead — each row is a unit-length direction in the original D-dimensional feature space | Statistics & ML |
pca_explained_variance | Fits the same PCA as pca on X and k, returning a length-k vector giving the fraction of the total variance in X that each kept component carries, in decreasing order | Statistics & ML |
pca_model | PCA as a reusable handle: fits the top k principal components on an N-row, D-column matrix X, so .predict(Xnew) projects new rows onto the same fitted components instead of.. | Statistics & ML |
peak | max(abs(x)) over every element of x — a scalar, Vec, or Mat/Signal, flattened | Core maths |
peek | On a fifo handle q: push(q, x) adds x at the back (returns Nothing); pop(q) removes and returns the front element; peek(q) looks at it without removing | Collections & strings |
peek_byte | Looks at the next raw byte of f (file handle, opened readable) without consuming it | File I/O |
peek_char | Looks at the next character of f (file handle, opened readable) without consuming it | File I/O |
peek_line | Looks at the next line of f (file handle, opened readable) without consuming it | File I/O |
percentile | Same computation as quantile, with p on a 0..100 scale instead of 0..1 (p=50 is the median) | Core maths |
periodic_profile | Returns a length-n_bins real vector, one summary statistic per bin | Signal processing |
periodogram | Returns a length-N/2 + 1 real vector, same scaling as welch | Signal processing |
permutation_importance | Shuffles one column of an N-row, D-column X at a time and re-scores an already-fitted model Record model against the matching length-N target y, over n_repeats shuffles per.. | Statistics & ML |
phase | Complex argument — the angle from the positive real axis, in radians (atan2(im, re)) — on a Complex/CVec/CMat; on a signed real scalar or real Vec/Mat it degrades to 0 for a.. | Core maths |
pie | Ordinary pie chart — same call shape as donut (values a Vec of numbers, trailing strings optional slice labels) with donut=false | Plotting |
pinv | Moore-Penrose pseudo-inverse (SVD-based) of A, an r×c Mat or CMat | Core maths |
pipeline | Composes one or more stage names (strings naming functions already defined in the program) into a single unfitted pipeline spec — every stage but the last must be a function (X) -> X; the.. | Statistics & ML |
plot | Draws a basic line (or, with a positional or marker= marker string such as "o", a scatter-style) plot of y versus x | Plotting |
pmap | Returns a List: f applied to every element | Collections & strings |
point | Marks a single position (x, y) (numbers, data units) with a dot | Plotting |
poisson | Exact Poisson draws. lambda (a positive number) is the rate, which is also the mean and the variance of the result; rows and cols (numbers, optional) give the shape of the draw, one.. | Statistics & ML |
polarplot | Converts polar coordinates theta (Vec of numbers, radians) and r (Vec of numbers, radius) to Cartesian (x=r·cos θ, y=r·sin θ) and draws an ordinary line/scatter series | Plotting |
poles | Returns a complex vector (CVec), one entry per pole across all sections/taps | Signal processing |
polyfit | Fits a least-squares polynomial of the given integer degree to a length-N vector x and a length-N vector y | Statistics & ML |
polygon | Draws a closed shape connecting the points (xs[i], ys[i]) in order and back to the first | Plotting |
polyval | Evaluates a coefficient vector coeffs (as returned by polyfit, highest-degree first) at x, either a single number or a length-N vector, by Horner's method | Statistics & ML |
pool | Returns a Pool handle, unregistered and scoped to wherever it's used | Concurrency |
pop | On a fifo handle q: push(q, x) adds x at the back (returns Nothing); pop(q) removes and returns the front element; peek(q) looks at it without removing | Collections & strings |
pop_back | Removes and returns the element from the front (pop_front) or back (pop_back) in O(1) | Collections & strings |
pop_front | Removes and returns the element from the front (pop_front) or back (pop_back) in O(1) | Collections & strings |
porous | sqrt(Rp Zi)/tanh(sqrt(Rp/Zi)), Zi = 1/(Q (jw)^n) — de Levie porous electrode | Signal processing |
pow | The operators as named functions, so an operation can be passed where a name is what you can pass | Core maths |
pow2db | Returns the same shape: 10*log10(x) | Signal processing |
precision | Classification metrics on a length-N vector of true labels actual and a length-N vector of predicted labels predicted, each returning a single number macro-averaged over every class.. | Statistics & ML |
predict | Applies a fitted model Record model to a new M-row (same D columns as it was fitted on) matrix or vector Xnew | Statistics & ML |
print | Writes its arguments, space-separated, and a newline, to stdout | Collections & strings |
printtex | Same conversion as tex(x) on value x (number, Vec, Mat, or complex), but prints it directly instead of returning a string | Plotting |
prod | Product of every element of x — a scalar, Vec, or Mat/Signal, real only (unlike sum, does not accept a CVec/CMat) | Core maths |
profile_end | Closes the window and returns a Record with fields time (elapsed seconds) and mem (RSS delta in bytes, NaN if either sample was NaN, e.g. on an unsupported platform) | REPL & diagnostics |
profile_start | Starts a named profiling window and returns a Record handle -- t0 (wall-clock seconds) and mem0 (RSS bytes, NaN if unsupported) -- to pass unmodified to profile_end | REPL & diagnostics |
profile_stats | profiling_mode takes one argument, a boolean (true to start recording, false to stop), and returns none | REPL & diagnostics |
profiling_mode | profiling_mode takes one argument, a boolean (true to start recording, false to stop), and returns none | REPL & diagnostics |
progress | A tqdm-style progress bar, called once per loop iteration: i is the 0-based index (0 through n - 1), n is the total count | REPL & diagnostics |
proper | Uppercases every word's first character, lowercases the rest — VB's StrConv(s, vbProperCase) | Collections & strings |
psd | Returns a 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 |
pt | Length units as functions, converting a scalar v (millimetres/centimetres/inches/points as named) to the figure's own coordinate space — a tenth of a millimetre, so mm(1) is 10,.. | Core maths |
pulse_frequency | Returns a single number: the mean interval between successive rising crossings (pulse_period) or its reciprocal (pulse_frequency) — seconds and Hz for a Signal, samples and.. | Signal processing |
pulse_period | Returns a single number: the mean interval between successive rising crossings (pulse_period) or its reciprocal (pulse_frequency) — seconds and Hz for a Signal, samples and.. | Signal processing |
pulse_width | Returns a single number: the mean width of the complete pulses, in seconds for a Signal and samples otherwise | Signal processing |
pump_watches | Checks every registered watch ... end (§ Watches, below) exactly ONCE, right now, against its real current external state, firing the body of any whose state has genuinely changed since.. | Concurrency |
push | On a fifo handle q: push(q, x) adds x at the back (returns Nothing); pop(q) removes and returns the front element; peek(q) looks at it without removing | Collections & strings |
push_back | Grows l at the back (push_back) or front (push_front) in O(1) | Collections & strings |
push_front | Grows l at the back (push_back) or front (push_front) in O(1) | Collections & strings |
pwd | cur_dir says what it gives back and pwd is what anyone who has used a shell types first, so both spellings exist rather than one being renamed out from under existing scripts | File I/O |
pwl | Continuous piecewise-linear least-squares fit through equal-length numeric Vecs x, y | Plotting |
pwm | Natural-sampling pulse-width modulation: modulator is a Vec of numbers (any signal, conventionally in [-1, 1]), carrier_freq and fs are numbers (Hz) | Plotting |
python_exec | Runs code (string, source in the guest language) as a subprocess | File I/O |
pzplot | Pole-zero plot (MATLAB's zplane concept): an x marker at each pole, o at each zero, and the unit circle as a reference polyline, titled with the filter's stability verdict | Signal processing |
Q
q_learning | Tabular temporal-difference learning on a gridworld_env env for an integer number of episodes, with learning rate alpha, discount factor gamma, and epsilon-greedy exploration rate.. | Statistics & ML |
qr | Thin QR decomposition of A (r×c Mat), A = Q·R | Core maths |
quantile | Linear-interpolation quantile (NumPy's default interpolation="linear" method) | Core maths |
quantile_normalize | Rank-based scaling of X (vector, matrix column-wise, or table per numeric column): each value is replaced by its rank against its own column, rescaled uniform onto [0, 1] | Statistics & ML |
queue | Creates an empty deferred-job list | Concurrency |
quick_mlp | Fits a single-hidden-layer multilayer perceptron in one call on an N-row, D-column feature matrix X and a length-N target vector y (or an (N, n_classes) one-hot matrix for.. | Statistics & ML |
R
raincloud | Allen et al. (2019) raincloud plot: one group per argument (each a Vec of numbers) at x = 0, 1, 2, ..., each rendered as a Gaussian KDE "cloud" + boxplot + jittered raw points ("rain") | Plotting |
rand | Draws from the uniform distribution on [0, 1) | Statistics & ML |
randi | Draws random integers. lo (number) is the smallest value that can come out; hi (number) is the largest, inclusive at both ends (MATLAB's convention, not NumPy's half-open one, so.. | Statistics & ML |
randn | Draws from the standard normal distribution (mean 0, std 1), same rows/cols/seed= shape as rand | Statistics & ML |
random_forest_model | Bagged ensemble of n_trees (a positive integer) CART trees on an N-row, D-column X and length-N y, each tree grown on its own bootstrap resample of the rows and a.. | Statistics & ML |
random_walk | Generates a discretized Wiener-process path: n_steps (a positive integer) increments, each drawn ~ Normal(drift, volatility), cumulatively summed, with an optional integer seed= | Statistics & ML |
range | Inclusive numeric range as a Vec, from a to b (both scalars) in increments of step (an optional positional scalar, default 1 — step= as a keyword is rejected, unlike most.. | Core maths |
range_decode | Inverse of range_encode: enc is the Record that call returned; as_str (named boolean, default false) asks for text instead of bytes | File I/O |
range_encode | Byte-oriented adaptive range coding of data (a Str, or a Vec of 0-255 byte values) | File I/O |
rank | Numerical rank of A (an r×c Mat or CMat) — the count of singular values clearing the tolerance | Core maths |
rans_decode | Inverse of rans_encode: enc is the Record that call returned; as_str (named boolean, default false) asks for text instead of bytes | File I/O |
rans_encode | rANS entropy coding of data (a Str, or a Vec of 0-255 byte values) — a static frequency table, unlike range_encode's adaptive model, so the table travels with the payload | File I/O |
re | Real component of a Complex/CVec/CMat (identity — x passed through unchanged — when x is already real) | Core maths |
read | swap atomically exchanges front and back (returns Nothing); read returns the stable front value | Collections & strings |
read_all | Reads every remaining byte from f (file handle, opened readable) | File I/O |
read_all_text | Reads path (string) in full. Returns the whole file's content as one string | File I/O |
read_array | Reads a whole binary file as one typed array, without an explicit fopen | File I/O |
read_bin | Reads up to n (a number) raw bytes from f (file handle, opened readable) | File I/O |
read_bit | Reads one bit from f (file handle, opened readable), MSB-first, advancing a sub-byte cursor that only moves to the next byte once all 8 bits of it are consumed | File I/O |
read_byte | Reads one raw byte from f (file handle, opened readable) | File I/O |
read_bytes | Blocks up to the handle's timeout_ms, returning a Vec of 0-255 integer values — possibly fewer than n if the timeout elapses first | Concurrency |
read_char | Reads one character from f (file handle, opened readable), UTF-8 aware | File I/O |
read_chars | Reads exactly n (number, count of Unicode characters, UTF-8 aware) characters from f (file handle, opened readable) | File I/O |
read_csv | Reads a CSV file into a Table | File I/O |
read_double | Reads a 64-bit IEEE-754 float from f (file handle, opened readable) | File I/O |
read_float | Reads a 32-bit IEEE-754 float from f (file handle, opened readable) | File I/O |
read_int | The width-as-a-value counterpart of the fixed-width family above: reads bytes (a number, 1/2/4/8 only) from f (file handle, opened readable) and decodes them as an integer, with.. | File I/O |
read_int16 | Reads a signed 16-bit integer from f (file handle, opened readable) | File I/O |
read_int32 | Reads a signed 32-bit integer from f (file handle, opened readable) | File I/O |
read_int64 | Reads a signed 64-bit integer from f (file handle, opened readable) | File I/O |
read_line | Reads one line from f (file handle, opened readable) | File I/O |
read_mat | Reads a MATLAB .mat file (via the matfile crate) without needing a MATLAB installation | File I/O |
read_struct | Reads one fixed-width binary record from f (file handle, opened readable) | File I/O |
read_structs | Reads up to n (number) fixed-width binary records from f (file handle, opened readable), using the same fields layout read_struct takes | File I/O |
read_uint16 | Reads an unsigned 16-bit integer from f (file handle, opened readable) | File I/O |
read_uint32 | Reads an unsigned 32-bit integer from f (file handle, opened readable) | File I/O |
read_uint64 | Reads an unsigned 64-bit integer from f (file handle, opened readable) | File I/O |
read_until | Reads from f (file handle, opened readable) up to and including the next occurrence of delimiter (string), consuming it | File I/O |
read_values | Reads n (number, count) typed values from an already-open handle | File I/O |
real | Real component of a Complex/CVec/CMat (identity — x passed through unchanged — when x is already real) | Core maths |
recall | Classification metrics on a length-N vector of true labels actual and a length-N vector of predicted labels predicted, each returning a single number macro-averaged over every class.. | Statistics & ML |
rect | Draws an axis-aligned rectangle | Plotting |
rectangle | Draws an axis-aligned rectangle | Plotting |
reduce | Returns the final accumulated value (whatever type f produces) | Collections & strings |
reflection_coefficient | Returns Γ = (z - z0)/(z + z0), complex | Signal processing |
regex_count | Returns a number: how many non-overlapping matches occur | Collections & strings |
regex_find | Returns a Str (the first match) or none — not an empty string, so "matched empty" and "did not match" stay apart | Collections & strings |
regex_find_all | Returns a List of Str — every match, in order | Collections & strings |
regex_groups | Returns a List of Str — the capture groups of the first match, group 1 onward; a group that did not participate is an empty string | Collections & strings |
regex_match | Returns a bool: whether the pattern occurs anywhere in s | Collections & strings |
regex_replace | s, 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_split | Returns a List of Str, split on every match of the pattern | Collections & strings |
regionprops | Takes that result and returns a List of one Record per blob, in label-id order, each with fields: label (integer id), area (pixel count), centroid_x, centroid_y (real.. | Images |
relu | Elementwise activation applied to a number, vector, or matrix x of any shape — relu clips negative values to zero, sigmoid squashes to (0, 1) | Statistics & ML |
remove | Two overloads, picked by the type of the second argument: text (Str) deletes every occurrence of it; start (number, 0-based index) with optional count (number of characters,.. | Collections & strings |
remove_dir | Deletes the directory path. 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_file | Deletes path (a Str). Errors if it does not exist or is not a regular file, rather than silently doing nothing | File I/O |
remove_nan | x with the missing samples dropped | Noise |
remove_noise | x is a length-N number vector or Signal. method="wiener" (default): a local adaptive Wiener filter — for each sample, compares the local variance in a window-wide neighborhood.. | Noise |
remove_outliers | The same criterion, with the flagged samples dropped | Noise |
remove_small_blobs | Drop connected components below that area, after labelling internally (identical operation to bwareaopen above) | Images |
rename_file | Renames old to new (both Str), generally within the same filesystem | File I/O |
repeat_str | s * n is the shorter spelling for the same thing; the function is not called repeat because that is a loop keyword | Collections & strings |
replace | Every literal (non-regex) occurrence of old in s is replaced by new | Collections & strings |
replace_outliers | The same criterion, with the flagged samples patched in place | Noise |
resample_to | Returns a new Signal at Fs=new_fs, whose length is whatever it takes to span the *same* start/end time as the input (generally not N) | Signal processing |
reset | Returns the environment env's starting state — a plain integer state index | Statistics & ML |
reshape | Reinterprets a value as a matrix of a given shape | Core maths |
resistor | R | Signal processing |
resize | Returns a new Image of exactly width x height pixels | Images |
restart | Returns a number: the elapsed time up to this call (the completed "lap"), then resets the object to zero and immediately starts it running again — a one-call lap/checkpoint pattern for.. | REPL & diagnostics |
return_loss | Returns -20 log10 |Γ| in dB, positive for a passive load — the engineering convention in which "20 dB return loss" means well matched | Signal processing |
reverse | Unicode-aware character reversal for a Str (same type back); element-order reversal for a List/Vec/Mask (same type and shape back) | Collections & strings |
rewind | Resets f's (file handle, opened readable) read cursor to the beginning — exactly seek(f, 0) | File I/O |
rfe | Recursive feature elimination on an N-row, D-column X and length-N y, down to an integer target n_features: repeatedly drops the weakest-scoring remaining column and refits | Statistics & ML |
rfft | Real-optimized half-spectrum FFT | Signal processing |
rgb | Builds a colour from channel numbers: r, g, b (and, for rgba, a fourth channel a) — a fractional 0–1 fourth channel is an opacity, a whole number 0–255 is a byte value like the.. | Plotting |
rgba | Builds 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 |
ridge | Tikhonov-regularized (L2) least squares on an N-row, D-column feature matrix X and a length-N target vector y, with regularization strength alpha (a non-negative number; plain.. | Statistics & ML |
ridge_model | The same fit as ols_model on an N-row, D-column X and a length-N y, but with L2 regularization strength alpha (a non-negative number) shrinking the coefficients toward zero;.. | Statistics & ML |
right | The last n characters of a string | Collections & strings |
rise_time | Returns a single number: the transition time of the first complete rising (resp | Signal processing |
rlkk_extrapolate | Returns a single length-M CVec, not a model | Signal processing |
rlkk_reconstruct | Returns a Model (kind "rlkk") with fields z (a length-N CVec, the reconstructed spectrum) and gamma (a length-M real vector, the fitted DRT coefficients) | Signal processing |
rlkk_validate | Returns a Model (kind "rlkk_validation") with fields valid (a boolean, true iff every point's percent residual is under threshold), residuals (a length-N real vector, percent),.. | Signal processing |
rms | Root-mean-square, sqrt(mean(x.^2)), of every element of x — a scalar, Vec, or Mat/Signal, flattened | Core maths |
rmse | The regression-error trio, each taking a length-N vector of true values actual and a length-N vector of predictions predicted, and returning a single number: mae the mean absolute.. | Statistics & ML |
rmsprop | Per-parameter learning rates derived from the running gradient history, given params (a Tensor to optimize) and lr (a number, default 0.001) | Statistics & ML |
robust_scale | Outlier-resistant scaling of X (vector, matrix column-wise, or table per numeric column): (x - median) / IQR | Statistics & ML |
rolling_max | Maximum over a centred window. Same shape/type rules as rolling_mean | Noise |
rolling_mean | Mean over a window centred on each sample | Noise |
rolling_min | Minimum over a centred window. Same shape/type rules as rolling_mean | Noise |
rolling_rms | Root-mean-square over a centred window — a moving level, e.g. for an RMS trigger threshold | Noise |
rolling_std | Sample (N-1, unbiased) standard deviation over a centred window, matching std/var exactly, so rolling_std(x, w)[i] equals std of that window — a property you can check | Noise |
rot90 | Rotates A (a Mat, or anything coercible to one) 90°×k counterclockwise; k is an optional scalar defaulting to 1, may be negative for clockwise rotation, and is taken mod 4 | Core maths |
round | Standard rounding functions, elementwise: floor toward negative infinity, ceil toward positive infinity, round to the nearest integer (half away from zero) | Core maths |
row_mean | Collapses each row of M (an r×c Mat, or anything coercible to one) to one number, returning an r×1 column Mat (not a plain Vec) | Core maths |
row_sum | Collapses each row of M (an r×c Mat, or anything coercible to one) to one number, returning an r×1 column Mat (not a plain Vec) | Core maths |
rows | Row / column count of A. On a Vec (shape (n, 1)), a Mat/Signal (shape (r, c)), or a bare scalar (shape (1, 1)), returns the corresponding dimension as a scalar Num | Core maths |
rtrim | Same parameters as trim, restricted to one end only (ltrim the left, rtrim the right) | Collections & strings |
run_for | Drives every registered every/after/at timer across a simulated virtual timeline, not a real wall-clock sleep | Concurrency |
S
sandbox_mode | Refuses file and network access for the rest of the session and returns none | REPL & diagnostics |
sarsa | Tabular temporal-difference learning on a gridworld_env env for an integer number of episodes, with learning rate alpha, discount factor gamma, and epsilon-greedy exploration rate.. | Statistics & ML |
save | Writes the named variables — path (string, destination file) plus one or more variable names (strings) given explicitly as extra arguments — to a JSON file, each tagged with its own type | File I/O |
save_all | Saves literally every current binding — every user variable plus Qu's own built-in constants (pi, e, tau, none, the Qu* escape-character constants, ...) — to path (string) | File I/O |
save_image | Encodes img and writes it to path, dispatching on the path's own extension: a .png extension writes a real (if uncompressed) PNG; any other extension, or none, writes a BMP | Images |
save_model | Writes a fitted kind="sequential" model Record m (from sequential/compile/quick_mlp/mlp_classifier/etc.) to an HDF5 file at the string path, weights and all, in a.. | Statistics & ML |
savefig | Exports the current figure to path (string, a filesystem path); format is chosen by the file extension | Plotting |
savgol | Savitzky-Golay: fits a degree-order polynomial over each window-wide neighbourhood and keeps its centre value, preserving peak height/width that a moving average would flatten | Noise |
sawtooth | Each generates one period-repeating waveform: freq (number, Hz), fs (number, sample rate in Hz), n (integer, sample count) are all scalars, in that order | Plotting |
scaled_dot_product_attention | Core attention computation: an (Nq, D) query matrix q, an (Nk, D) key matrix k, and an (Nk, Dv) value matrix v (k and v share the same row count Nk) | Statistics & ML |
scan | scanf backwards: "hello world 12".parse_as("hello world %d") gives 12 | Collections & strings |
scatter | Same machinery as plot — x, y are equal-length Vecs of numbers — but defaults its marker to "o" (dots) instead of "line" | Plotting |
scatterfit | Draws a scatter of equal-length numeric Vecs x, y plus a polyfit trend line | Plotting |
score | Scores a fitted model Record model against an N-row feature matrix X and, for a supervised kind, the matching length-N target vector y | Statistics & ML |
sech | The other three hyperbolics: coth(x) = cosh(x)/sinh(x), sech(x) = 1/cosh(x), csch(x) = 1/sinh(x) | Core maths |
seed | Reseeds the shared random stream with integer n, so subsequent calls to rand/randn/etc | Statistics & ML |
seek | Moves f's (file handle, opened readable) read cursor | File I/O |
select | Returns a Table containing only the named columns, in the order given | Collections & strings |
semaphore | Creates a counting semaphore with n (integer, must be non-negative) initial permits | Concurrency |
semaphore_acquire | Blocks the calling thread until a permit is free on semaphore handle s, then takes it (decrementing the available count by one) | Concurrency |
semaphore_available | Non-blocking snapshot of how many permits are free right now on semaphore handle s | Concurrency |
semaphore_release | Returns one permit to semaphore handle s (incrementing the available count by one) | Concurrency |
semilogx | Plots equal-length numeric Vecs x, y like plot and additionally sets the x-axis to log scale | Plotting |
semilogy | Plots equal-length numeric Vecs x, y like plot and additionally sets the y-axis to log scale | Plotting |
sequential | Initializes a stack of layer specs (a list of dense_layer/dropout_layer Records, or a single one) into a trainable model: weights use He initialization (sqrt(2/in_dim)) on a layer.. | Statistics & ML |
sequential_split | The same shape as train_test_split on X/y/test_size, but never shuffles: the first rows become the training set, the last rows the test set, in their original order | Statistics & ML |
serial_open | Opens a real OS serial port. port (string) is the OS device name, e.g. "COM3" on Windows or "/dev/ttyUSB0" on Linux/macOS | Concurrency |
serial_ports | Lists the short names of every serial device the OS currently reports (e.g. "COM3" on Windows, "/dev/ttyUSB0" on Linux/macOS) | Concurrency |
series | Two or more circuits in series; impedances add | Signal processing |
set | get returns the stored value (any type) or none if key is absent | Collections & strings |
sfdr | With no excitation named, the largest non-DC FFT bin is taken as the fundamental (the single-tone case); tones=/freqs= (a vector, Hz, needs fs=/rate= too) or bins= (a vector of.. | Signal processing |
sgd | Plain stochastic gradient descent (sgd) and its look-ahead variant (nesterov_sgd, which evaluates the gradient after applying the momentum step rather than before it), given params (a.. | Statistics & ML |
shape | The full shape of A as a 2-element Vec, [rows, cols], using the same per-type shape rules as rows/cols above | Core maths |
sharpen | Applies a fixed 3x3 unsharp-mask sharpen kernel | Images |
shell | Hands command (a Str) to the OS shell and returns immediately, without waiting — Visual Basic's Shell, which is where the window styles come from too | File I/O |
shortest_path | Returns a number (the shortest total edge weight, via Dijkstra) or none if to is unreachable from from — disconnected is an answer, not an error | Collections & strings |
sigma_delta | Returns a same-length vector or Signal (preserving x's Fs when it's a Signal), each sample +1/-1 | Signal processing |
sigmoid | Elementwise activation applied to a number, vector, or matrix x of any shape — relu clips negative values to zero, sigmoid squashes to (0, 1) | Statistics & ML |
sign | The sign of each element, using Rust's f64::signum semantics: -1 for a negative value (including -0.0), +1 for a non-negative value (including +0.0 — so sign(0) returns 1,.. | Core maths |
signal | Tags Vec x (numbers) with sample rate fs (number, Hz), so later calls (like rfft) do not have to be told it again | Plotting |
signal_slice_time | Returns a new Signal at the same Fs | Signal processing |
simple_cnn | Builds an untrained conv → relu → maxpool → dense image classifier: [height, width] a 2-element vector giving the image size, n_classes a positive integer, and an optional integer.. | Statistics & ML |
simple_rnn_classifier | Builds an untrained GRU-backed sequence classifier: input_size/hidden_size/n_classes positive integers (features per timestep, hidden width, and number of classes), plus an optional.. | Statistics & ML |
simulate | Draws one random trajectory from a markov_chain chain, starting at its initial_state, for an integer n_steps transitions (with an optional integer seed=) | Statistics & ML |
sin | Standard trigonometric functions, computed elementwise | Core maths |
sinad | With no excitation named, the largest non-DC FFT bin is taken as the fundamental (the single-tone case); tones=/freqs= (a vector, Hz, needs fs=/rate= too) or bins= (a vector of.. | Signal processing |
sinad_estimate | Returns a single number: sinad_estimate in dB, enob_estimate in bits | Signal processing |
sine | Returns a length-n Signal (carries Fs=fs) | Signal processing |
sinh | Hyperbolic sine/cosine/tangent, elementwise | Core maths |
size | The full shape of A as a 2-element Vec, [rows, cols], using the same per-type shape rules as rows/cols above | Core maths |
sizeof | Deprecated — use shape. The same function under a name that means a byte count in every language it could have come from | Collections & strings |
skewness | Third standardized moment, population form, of a length-N numeric vector x | Statistics & ML |
sleep | Pauses the calling thread for that long | Concurrency |
smith | Impedance on the reflection-coefficient plane: z = Z/z0, Γ = (z−1)/(z+1), drawn on the unit disc ruled by constant-resistance circles and constant-reactance arcs | Plotting |
smooth | One word for the smoothers. x is a length-N number vector; window is a named/positional odd integer, default 5; method is a named string, one of "savgol" (default), "moving",.. | Noise |
smoothmax | Smooth (differentiable) approximation to max(x): (1/beta) * logsumexp(beta * x), which tracks the true maximum more tightly as beta grows (at the cost of a stiffer gradient) | Core maths |
snr | With no excitation named, the largest non-DC FFT bin is taken as the fundamental (the single-tone case); tones=/freqs= (a vector, Hz, needs fs=/rate= too) or bins= (a vector of.. | Signal processing |
sns_bar | Aggregates column valuecol (string, column name) within each distinct value of groupcol (string, column name) of Table df, using aggregator agg (string, positional, default.. | Plotting |
sns_box | One boxplot group per distinct value of column groupcol (string, first-seen order) in Table df, each group's values drawn from column valuecol (string) and labeled with the group's.. | Plotting |
sns_scatter | Seaborn-style scatter pulling columns from Table df: xcol, ycol (strings, column names) give the coordinates; optional huecol (string, column name) draws one series per distinct hue.. | Plotting |
softmax | Elementwise exp(x_i) / sum(exp(x)) — the gradient of logsumexp, and a probability distribution that sums to 1 | Core maths |
softmax_rows | Softmax along each row of an N-row, D-column matrix M of scores, shifted by the row maximum first so a large score cannot overflow the exponential | Statistics & ML |
solve | Solves A·x = b for x by LU with partial pivoting (or, for a CMat/CVec A/b, by complex SVD least squares) | Core maths |
sort | A list of strings sorts lexicographically, a numeric vector sorts numerically | Collections & strings |
sort_by | Returns a Table sorted by that one column | Collections & strings |
sosfilt | Returns a same-length vector or Signal (keeping x's own Fs on the way out, when x is a Signal) | Signal processing |
spawn | Runs an already-defined user function on rayon's global thread pool (the Worker abstraction) | Concurrency |
spectral_coherence | Returns a length-nperseg/2 + 1 real vector, the magnitude-squared coherence |Pxy|^2 / (Pxx*Pyy) in [0, 1] — 1 at a frequency where y is an exact linear/time-invariant function.. | Signal processing |
spectral_entropy | Returns a vector of length num_frames (one value per STFT frame), each the Shannon entropy of that frame's normalized power spectrum, scaled to [0, 1]: low when energy concentrates in a.. | Signal processing |
spectrogram | If x is a Signal, its own Fs is used and fs need not be passed; passing one that disagrees with the signal's rate is an error rather than a silent relabelling (see *Which rate is.. | Signal processing |
spectrum | Returns a spectrum of floor(N/2)+1 one-sided bins (DC to Nyquist) | Signal processing |
spectrum_at | Returns the single complex bin nearest that physical frequency (round(freq/df), clamped to the available bins) — addressing the spectrum in Hz instead of by index | Signal processing |
spectrum_normalize | Returns a new spectrum with that convention applied — the same conversion fft/rfft(..., scaling=) do at transform time, usable afterward on a spectrum that already went through.. | Signal processing |
spectrum_unnormalize | Returns a new raw_transform-scaled spectrum — the exact inverse of spectrum_normalize/scaling= | Signal processing |
spiderplot | Radar chart; each argument (a Vec of numbers, one value per spoke/category) becomes its own series, layered onto the current panel's spider chart (repeated calls add more series) | Plotting |
splineplot | Natural cubic spline through the control points (x[i], y[i]) (equal-length numeric Vecs), resampled onto 200 points for a smooth line | Plotting |
split | s and delim are Strs; optional limit (number of pieces, default: unlimited) stops after that many pieces and leaves the remainder undivided as the last one — split(line, ": ", 2).. | Collections & strings |
sqrt | Elementwise square root. x is a scalar, Vec, or Mat/Signal; a negative element gives NaN (there is no automatic promotion to a complex result) | Core maths |
square | A bipolar (±1) periodic pulse train | Plotting |
stackbar | Stacked bar chart: x (Vec, category positions) and y (Mat or list of Vecs, one row/series per stack segment) with the same values=/hatch= options as bar | Plotting |
stair | Step (staircase) plot of equal-length numeric Vecs x, y | Plotting |
stamp | Places a transformed copy of a captured layer (the value capture returned) at position (x, y) (numbers, data units) | Plotting |
standardize | z-score scaling of X (vector, matrix column-wise, or table per numeric column): (x - mean) / std | Statistics & ML |
start | Begins counting, or resumes from pause | REPL & diagnostics |
starts_with | Returns a bool: true if s starts with prefix | Collections & strings |
stationary | Computes the long-run state distribution of a markov_chain chain by power iteration; converges for any irreducible, aperiodic chain | Statistics & ML |
std | Sample standard deviation (N-1, unbiased, denominator) of every element of x — a scalar, Vec, or Mat/Signal | Core maths |
ste | Returns a vector of length num_frames, one energy value per frame | Signal processing |
stem | Discrete stem plot: x, y are equal-length Vecs of numbers; draws a vertical line plus a dot from the baseline up to each (x[i], y[i]) (marker "stem") | Plotting |
step | Applies one action (an integer 0-3) from the current integer state index in environment env | Statistics & ML |
stft | Returns an nfft×num_frames complex matrix (CMat, the full per-frame spectrum, not one-sided) — one column per frame, built from a periodic-Hann-windowed FFT per frame | Signal processing |
stop | Freezes the timer and resets the count to zero (unlike pause, which keeps it); returns none | REPL & diagnostics |
stop_grad | Returns the plain, untracked inner value (same numeric content and shape) detached from the tape, so gradients don't flow through it — e.g. holding a target/label steady, or truncating.. | REPL & diagnostics |
str | Renders x (any value/type) the same way print/disp would | Collections & strings |
stratified_split | The same shape as train_test_split on X/y/test_size/seed=, but splits each class of y separately before combining, so a rare class keeps its proportion in both sets every time.. | Statistics & ML |
subplot | Selects cell k (integer, 1-based, row-major) of a rows-by-cols (integers) grid as the target for further drawing | Plotting |
substr | Plain aliases of the same implementation (mid exists purely for BASIC/Excel discoverability) | Collections & strings |
subtract | The operators as named functions, so an operation can be passed where a name is what you can pass | Core maths |
sum | Sum of every element of x — a scalar, Vec, or Mat/Signal (real; additionally accepts a CVec/CMat and returns a Complex in that case) | Core maths |
svd | Thin SVD of A (r×c Mat or CMat), A = U·diag(s)·Vᵀ | Core maths |
svm_model | Binary-classification support-vector machine by simplified SMO on an N-row, D-column X and a length-N target y that must take exactly two distinct values (no one-vs-rest wrapper) | Statistics & ML |
svr_model | Support-vector regression on an N-row, D-column X and a length-N numeric target y | Statistics & ML |
swap | swap atomically exchanges front and back (returns Nothing); read returns the stable front value | Collections & strings |
sweep | Generates a linear (or, with method="logarithmic", log) frequency sweep from f0 to f1 (numbers, Hz) sampled at rate fs (number, Hz) for n (integer) samples | Plotting |
sysinfo | Returns a Record describing this machine: .os/.arch/.hostname/.cpu/.qu_version/.build (strings), .logical_cores (integer), .physical_cores and .total_memory (number, or.. | Concurrency |
T
table | Each named argument is a column: values is either a numeric Vec / List of Str (a real column) or a scalar number/Str (broadcast to every row) | Collections & strings |
tail | Returns the first (head) or last (tail) n elements/rows, same type as s | Collections & strings |
take | Returns the same type as xs: the first n elements (take) or everything after them (drop) | Collections & strings |
tan | Standard trigonometric functions, computed elementwise | Core maths |
tanh | Hyperbolic sine/cosine/tangent, elementwise | Core maths |
tape_reset | Discards every entry recorded so far on the autodiff tape, freeing the memory a chain of param/grad calls has built up | Statistics & ML |
tcp_accept | Returns a TcpListener handle from tcp_listen, and a TcpConn handle from tcp_accept | Concurrency |
tcp_close | sock must be a TcpConn handle (from tcp_accept/tcp_connect) — not a TcpListener; calling it on a listener errors, since a listener has no explicit close and simply releases its OS.. | Concurrency |
tcp_connect | tcp_connect(host, port): host (string, hostname or IP) and port (integer 0-65535) — blocks until connected (or the OS gives up and errors), returning a TcpConn handle, the.. | Concurrency |
tcp_listen | Returns a TcpListener handle from tcp_listen, and a TcpConn handle from tcp_accept | Concurrency |
tcp_port | tcp_connect(host, port): host (string, hostname or IP) and port (integer 0-65535) — blocks until connected (or the OS gives up and errors), returning a TcpConn handle, the.. | Concurrency |
tcp_recv | Neither call frames the message for you — TCP is a stream, so a length prefix or delimiter is yours to add if you need distinct messages | Concurrency |
tcp_send | Neither call frames the message for you — TCP is a stream, so a length prefix or delimiter is yours to add if you need distinct messages | Concurrency |
tell | Reports f's (file handle, opened readable) current read position | File I/O |
tex | Not figure export — converts a single Qu value x (number, Vec, Mat, or complex) to a LaTeX math-mode string (e.g. a matrix becomes a bmatrix environment) and returns it as a string | Plotting |
text | Plain text label text (string) placed at (x, y) (numbers, data units), no marker dot | Plotting |
thd | Returns a single number, dB below the fundamental | Signal processing |
thd_n | Returns a single number, dB below the fundamental: harmonics *and* noise together against the signal (-sinad_db, the same noise_power sinad already totals over every non-excitation.. | Signal processing |
theme | Sets the whole-figure visual theme from name (string): one of "default", "publication", "bw", "minimal", "grey", "classic" | Plotting |
threshold | Elementwise binary threshold, general-purpose (not image-specific) | Images |
tic | Starts (or restarts) the single global stopwatch | REPL & diagnostics |
title | Sets the current panel's title to text (string) | Plotting |
tkeo | Returns a length-(N-2) vector (like diff, doesn't pad — the definition needs a neighbor on each side) | Signal processing |
tmp_file | Creates a new empty file under the OS temp directory with a name nothing else will collide with (process id, nanosecond clock, and a counter — any one alone has a plausible collision window) | File I/O |
to_bool | For a Str, x is parsed, not weighed: "true"/"false" (any case) and any number spelling work, and anything else errors — because a config file holding "false" means false, and.. | Collections & strings |
to_cmyk | Takes apart any colour the language accepts (color, a string) into that space's own coordinates, returned as a Vec of numbers — to_rgb gives (r,g,b), to_hsl gives (h,s,l),.. | Plotting |
to_float | The parsing half of to_int without the rounding — mostly for turning text read from a file or an instrument into a number | Collections & strings |
to_hsl | Takes apart any colour the language accepts (color, a string) into that space's own coordinates, returned as a Vec of numbers — to_rgb gives (r,g,b), to_hsl gives (h,s,l),.. | Plotting |
to_hsv | Takes color (any string/value the language accepts as a colour — name, hex, rgb(...), etc.) and returns its (h, s, v) triple as a Vec of numbers | Plotting |
to_int | Rounds to the nearest whole number, ties away from zero — the same primitive round uses, so the two agree by construction rather than by coincidence | Collections & strings |
to_lab | Takes apart any colour the language accepts (color, a string) into that space's own coordinates, returned as a Vec of numbers — to_rgb gives (r,g,b), to_hsl gives (h,s,l),.. | Plotting |
to_rgb | Takes apart any colour the language accepts (color, a string) into that space's own coordinates, returned as a Vec of numbers — to_rgb gives (r,g,b), to_hsl gives (h,s,l),.. | Plotting |
to_vec | Returns a List: the linked list's elements, front to back | Collections & strings |
toc | Returns a number: elapsed seconds (float, fractional) since the last tic() | REPL & diagnostics |
tolower | Returns a Str: C's names for upper/lower, accepted so a ported line does not have to be edited | Collections & strings |
touch | Unix touch semantics. path (string) is the filesystem path: creates an empty file if it doesn't exist; if it already exists, updates its modification time WITHOUT altering its content | File I/O |
toupper | Returns a Str: C's names for upper/lower, accepted so a ported line does not have to be edited | Collections & strings |
trace | The sum of the diagonal of M, a square (or rectangular — only min(rows,cols) diagonal entries are summed) Mat | Core maths |
track | Wraps a plain number, vector, or matrix v as a fresh, differentiable Tensor — a new leaf node on the autodiff tape with no inputs of its own, so grad treats it as something to.. | Statistics & ML |
train_loop | Runs the fit loop inside the engine rather than stepping it from Qu: loss_fn_name a string naming an in-scope function (params) -> number, params the Tensor (from param(...)) or.. | Statistics & ML |
train_test_split | Splits an N-row feature matrix X and a length-N target vector y into training and test sets, X and y permuted together by the same random order (unless shuffle=false) | Statistics & ML |
train_val_test_split | Three-way split of X/y into training, validation, and test sets: val_size/test_size are numbers in (0, 1) (both default 0.2); val_size is rescaled against the remainder left.. | Statistics & ML |
transform | Applies a fitted scaler Record scaler's stored parameters to a new matrix/vector/table newX with the same columns it was fitted on | Statistics & ML |
transformer_block | One transformer block on an (N, D) input x: multi-head self-attention plus a two-layer feed-forward network, each wrapped in a residual connection and a layer_norm | Statistics & ML |
transpose | Matrix/vector transpose: swaps rows and columns | Core maths |
tree_model | One CART decision tree on an N-row, D-column matrix X and a length-N target y, with max_depth (integer, default 20) limiting tree depth, min_samples_split (integer, default 2).. | Statistics & ML |
triangle | Each generates one period-repeating waveform: freq (number, Hz), fs (number, sample rate in Hz), n (integer, sample count) are all scalars, in that order | Plotting |
trim | Strips characters from both ends of a string | Collections & strings |
tsne | t-SNE embedding of an N-row, D-column matrix X into n_components dimensions (an integer, default 2), controlled by perplexity (a number balancing local vs. global structure; unset.. | Statistics & ML |
tv_denoise | Total-variation denoising: y is a length-N number vector; lambda is an optional positional number, the smoothing penalty, default 1.0 — larger values remove more variation | Noise |
type | Returns a Str: the value's type, e.g. "number", "string", "vector", "matrix", "table", "layer" | Collections & strings |
U
ucase | BASIC's names for upper/lower; toupper/tolower are C's names for the same thing | Collections & strings |
ui_button | Declares a push-button, labeled label (string); id= (string) as above | Plotting |
ui_checkbox | Declares an on/off toggle, labeled label (string) | Plotting |
ui_number | Declares a free-entry number box (for a value you type exactly rather than sweep), labeled label (string) | Plotting |
ui_select | Declares a dropdown, labeled label (string), choosing among options (a List of strings — or of any values, displayed via their string form) | Plotting |
ui_slider | Declares a slider control (for a value you sweep) in an explore page or Qu Studio, labeled label (string) with range min..max (numbers) | Plotting |
ui_text | Declares a free-text field, labeled label (string) | Plotting |
undershoot | Returns a single number, a percent of the step's own size abs(final - initial): overshoot is how far the response travels *past its settled value* in the direction the step was going,.. | Signal processing |
uniform | Draws from the uniform distribution on [a, b), two numbers a < b, with the same rows/cols/seed= shape as rand | Statistics & ML |
unique | Returns a Vec: a sorted, de-duplicated copy | Collections & strings |
unit_scale | Returns the scale factor a unit name = ... declaration registered, or errors naming name if nothing was ever declared under it | REPL & diagnostics |
update | Estimation-family only: the measurement-update half of a filter, called on a state Record state with filter-specific arguments (an observation matrix/function, a measurement vector, and a.. | Statistics & ML |
upper | Unicode-aware uppercase conversion | Collections & strings |
V
val | Materializes a value; currently the identity on any x (:= is already eager pre-M4) but will force evaluation of a deferred binding once M4 lazy fusion lands | Core maths |
values | Returns a List: its keys (keys), its values (values), or (key, value) tuples (items) — insertion order, not sorted | Collections & strings |
vanicek | Returns a length-M real vector, the power spectrum at each requested frequency — Vanicek's Least-Squares Spectral Analysis, valid for unevenly-sampled (t, x) where fft/dft/goertzel.. | Signal processing |
var | Sample variance, same N-1 (unbiased) denominator as std, so var(x) == std(x)^2 always holds | Core maths |
verify_signal | Structural sanity before any of the semantic diagnostics above is worth running — deliberately narrow: it answers "are these samples a usable record", not "is this signal any good" | Signal processing |
violin | The same Gaussian KDE and Tukey summary as raincloud, arranged the other way: the density is MIRRORED about the category into the closed symmetric shape, with the box inside it and the.. | Plotting |
viterbi | Runs the Viterbi algorithm on an hmm model hmm for a length-T integer observation sequence obs (same encoding as forward) | Statistics & ML |
vline | Draws a vertical reference line spanning the whole panel at x (number, data units) | Plotting |
vmd | Variational Mode Decomposition: decomposes x into exactly k band-limited modes by minimizing each mode's bandwidth around its own center frequency, solved by ADMM (not sifting, unlike.. | Signal processing |
voronoi | Computes the Voronoi diagram of an (N, 2) point matrix points, built on a real Delaunay triangulation | Statistics & ML |
vstack | Named equivalents of bracket-literal block concatenation ([a, b] horizontally / [a; b] vertically) | Core maths |
vswr | Returns (1 + |Γ|)/(1 - |Γ|) | Signal processing |
W
warburg | Aw (1-j)/sqrt(w) — semi-infinite diffusion, a constant −45° phase at every frequency | Signal processing |
warburg_open | Rw coth(x)/x, x = sqrt(jw tau) — finite length, reflecting boundary | Signal processing |
warburg_short | Rw tanh(x)/x, x = sqrt(jw tau) — finite length, transmissive boundary | Signal processing |
warn | Non-fatal — execution continues on the next line, unlike error | REPL & diagnostics |
waterfall | A 2-D approximation of the stacked-trace look — no true 3-D projection yet | Plotting |
welch | Returns 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 |
where | One argument mask (a Vec/Mat of booleans, typically produced by a comparison like x < 0) returns a Vec of the 0-based indices where it is true. Three arguments — cond (a boolean.. | Core maths |
worker_done | Non-blocking check of whether worker w (a Worker handle from spawn) has finished | Concurrency |
wrap | Returns the same shape as x, each value reduced modulo hi - lo into that range — the standard fix for angle/phase data that has accumulated past a full turn (atan2 output, an.. | Signal processing |
write | Dispatches on the type of the first argument | REPL & diagnostics |
write_array | Writes a whole Vec/Mat/Signal (or a bare number/bool) to a binary file in one call, without an explicit fopen — the write-side counterpart read_array never had | File I/O |
write_bin | The inverse of read_bin: writes raw bytes to f (file handle, opened writable/appendable) | File I/O |
write_bit | Writes one bit to f (file handle, opened writable/appendable) | File I/O |
write_byte | Writes one raw byte to f (file handle, opened writable/appendable) | File I/O |
write_char | Writes s (string) to f (file handle, opened writable/appendable) with no newline added | File I/O |
write_csv | Writes a Table to a CSV file | File I/O |
write_double | Writes n (number) to f (file handle, opened writable/appendable) as a 64-bit IEEE-754 float | File I/O |
write_float | Writes n (number) to f (file handle, opened writable/appendable) as a 32-bit IEEE-754 float | File I/O |
write_int | The mirror of read_int, writing value (a number) to f (file handle, opened writable/appendable) in the given width and byte order | File I/O |
write_int16 | Writes n (number) to f (file handle, opened writable/appendable) as a signed 16-bit integer | File I/O |
write_int32 | Writes n (number) to f (file handle, opened writable/appendable) as a signed 32-bit integer | File I/O |
write_int64 | Writes n (number) to f (file handle, opened writable/appendable) as a signed 64-bit integer | File I/O |
write_line | Writes s (string) to f (file handle, opened writable/appendable) plus a trailing \n | File I/O |
write_report | Writes a standalone HTML report to path (string) — every figure, table, and printed line the script has produced up to this point in execution, bundled into one file with nothing linked.. | File I/O |
write_text | Writes the whole string to a file, overwriting it | Collections & strings |
write_uint16 | Writes n (number) to f (file handle, opened writable/appendable) as an unsigned 16-bit integer | File I/O |
write_uint32 | Writes n (number) to f (file handle, opened writable/appendable) as an unsigned 32-bit integer | File I/O |
write_uint64 | Writes n (number) to f (file handle, opened writable/appendable) as an unsigned 64-bit integer | File I/O |
writeline | Writes its arguments, space-separated, and a newline, to stdout | Collections & strings |
X
xbreak | Reshapes the *main* x-axis's coordinate mapping with a fixed-width "//" jag that squeezes out the skipped range [lo, hi] (numbers, data units) — linear-scale axes only | Plotting |
xcorr | Returns a length-N+M-1 vector, the full lag range (zero lag at the middle for equal-length inputs) | Signal processing |
xlabel | Labels the current panel's x-axis with text (string) | Plotting |
xlim | Fixes an axis range from lo, hi (numbers, data units) | Plotting |
xml2csv | str (string, XML text) is converted to CSV text: exactly csvify(parse_xml(str)). Returns a string | File I/O |
xml2json | Like csv2json, this produces the same plain array-of-row-objects shape, not jsonify(parse_xml(str))'s type-tagged envelope | File I/O |
xmlify | Converts any value (any Value) to an XML string — see "The Value<->XML mapping" below | File I/O |
xor | Returns a bool: logical XOR, non-short-circuit like and/or | Collections & strings |
xscale | Sets that axis's scale from a string, "linear" or "log" | Plotting |
xspan | Draws a translucent vertical band covering x in [x0, x1] (numbers, data units) across the panel's full height | Plotting |
xticklabels | Sets categorical x tick labels from the given strings (variadic positional arguments); without an xticks(...) call, spread evenly across the current x-extent | Plotting |
xticks | Sets explicit x tick positions from positions (Vec of numbers, data units), paired in order with xticklabels(...) when both are set | Plotting |
Y
ybreak | Same as xbreak, on the y-axis: squeezes out [lo, hi] (numbers, data units) | Plotting |
ylabel | Labels the current panel's y-axis with text (string) | Plotting |
ylim | Fixes an axis range from lo, hi (numbers, data units) | Plotting |
yscale | Sets that axis's scale from a string, "linear" or "log" | Plotting |
yspan | Draws a translucent horizontal band covering y in [y0, y1] (numbers, data units) across the panel's full width | Plotting |
yticklabels | yticks takes a Vec of numbers (tick positions, data units); yticklabels takes variadic strings to relabel them in order | Plotting |
yticks | yticks takes a Vec of numbers (tick positions, data units); yticklabels takes variadic strings to relabel them in order | Plotting |
Z
zeros | A vector or matrix of zeros. One numeric argument n gives a length-n Vec; two arguments r, c give an r×c Mat — even a degenerate two-argument shape like zeros(n, 1) stays a.. | Core maths |
zeros_like | A vector or matrix of the same shape as x (a Vec or Mat), filled with one or zero respectively — the shape is read directly from x, so it cannot fall out of step with it | Core maths |
zip | Returns a List of tuples, pairing up the collections element by element, stopping at the shortest | Collections & strings |
zlib_decompress | Inflates a zlib stream (RFC 1950 wrapper around RFC 1951 DEFLATE): data is a Str or a Vec of 0-255 byte values; as_str (named boolean, default false) asks for text instead of bytes | File I/O |
zoom_inset | Magnifies the data region x in [x0, x1], y in [y0, y1] (numbers, data units) into an auto-placed inset panel, with a dashed zoom-box drawn over the source region and connector lines.. | Plotting |
Native modules
Not builtins, and deliberately not in the count above: these come from modules compiled into the engine, and a program reaches them with import, which opens the bare name and leaves the qualified one available too.
codec.decode_flac | Decodes a FLAC file to samples | File I/O |
codec.decode_mp3 | Decodes an MP3 file. Same arguments and same two return forms as codec.decode_flac | File I/O |
codec.decode_wav | Decodes a WAV file. Same arguments and same two return forms as codec.decode_flac | File I/O |
codec.encode_wav | The same encoder as codec.write_wav, returning the file's bytes as a Vec of whole numbers 0-255 instead of writing them — the exact inverse of what codec.decode_wav accepts, so a.. | File I/O |
codec.flac_info | Reads a FLAC file's header without decoding any audio, which is how to check a file is what you expect before paying for the samples | File I/O |
codec.write_wav | Writes audio out as a WAV file | File I/O |
xlsx.read | Reads one worksheet of a workbook into a Table, the same type read_csv produces, so everything that consumes a CSV consumes a spreadsheet unchanged | File I/O |
xlsx.sheets | Names a workbook's worksheets without reading any of them, so a program can find out what it is holding before deciding what to load | File I/O |
xlsx.write | Writes a Table out as a one-worksheet workbook | File 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.