The Crow Programming Language

math

Tensors, element-wise math, reductions, linear algebra, random numbers, signal processing, sparse arrays, and numeric loading.

The math module is built in — no file needed. It provides tensor creation, element-wise operations, reductions, shape operations, and linear algebra. After use math, all functions are called directly (e.g. zeros[3], not math.zeros[3]).

Tensor Creation

FunctionDescriptionExample
zeros[d1, d2, ...]Tensor of zeros with given shapeAutomatic differentiation · Math: tensors
ones[d1, d2, ...]Tensor of ones with given shapeMath: tensors
full[d1, d2, ..., value]Tensor filled with value (last arg)Math: tensors
eye[n]n×n identity matrixMath: reductions and linear algebra · Math: tensors
onehot[targets, classes]A row per target, 1 in its class's column and 0 elsewhere: the targets a vector of whole numbers from 0 to classes − 1 (a target that is no class stops the program: onehot: 7 is not a class of 3 (0 to 2))Math: tensors
diag[tensor]Extract diagonal from a 2D tensorMath: tensors
linspace[start, end, n]n evenly spaced values from start to endMath: random, signal, special, and sparse · Math: tensors
arange[start, end, step]Values from start to end by stepMath: tensors · The standard library's layer: use sys
randn[d1, d2, ...]Normal random values (mean=0, std=1); written in Crow (see Random Numbers)Math: tensors
tensor[array]Convert an array to a tensorMath: tensors

Element-wise Operations

FunctionDescriptionExample
exp[t]Element-wise exponentialAutomatic differentiation · Math: tensors
ln[t]Element-wise natural logMath: tensors
log2[t]Element-wise base-2 logarithmMath: tensors
log10[t]Element-wise base-10 logarithmMath: tensors
sqrt[t]Element-wise square rootMath: tensors · Numbers and conversion · Data Types
abs[t]Element-wise absolute valueFrames: use frame · Math: tensors · Numbers and conversion · The Element Vocabulary
sign[t]Element-wise sign (-1, 0, or 1)Math: tensors · Web: responses and submodules
floor[t]Element-wise floorMath: tensors · Numbers and conversion
ceil[t]Element-wise ceilingNumbers and conversion
round[t]Element-wise round to nearestMath: reductions and linear algebra · Math: random, signal, special, and sparse · Math: tensors · Numbers and conversion · Data Types
clip[t, lo, hi]Clamp values to [lo, hi]Math: tensors
mod[t, divisor]Element-wise moduloMath: tensors
sin[t]Element-wise sineAutomatic differentiation · Math: tensors
cos[t]Element-wise cosineMath: tensors
tan[t]Element-wise tangentMath: tensors
asin[t]Element-wise arcsineMath: tensors
acos[t]Element-wise arccosineMath: tensors
atan[t]Element-wise arctangentMath: tensors
atan2[y, x]Element-wise two-argument arctangentMath: tensors
sinh[t]Element-wise hyperbolic sineMath: tensors
cosh[t]Element-wise hyperbolic cosineMath: tensors
tanh[t]Element-wise hyperbolic tangentMath: tensors

Reductions

FunctionReturnsExample
sum[t]Sum of all elements (float), added as numpy adds them — pairwise, so the error grows as log n and sum[x] is numpy.sum(x) to the last digitFrames: use frame · Math: reductions and linear algebra · Math: random, signal, special, and sparse · Math: tensors · Importing with use · Aliased Imports · Project: Analyzing Data · Charts and Styling · The Database Layer · Views and Live Updates
mean[t]Mean of all elements (float): the sum over the countMath: reductions and linear algebra · Math: tensors · Importing with use
min[t]Minimum element (float)Math: reductions and linear algebra · Numbers and conversion
max[t]Maximum element (float)Frames: use frame · Math: reductions and linear algebra · Math: tensors · Neural-network building blocks: use math.nn · Numbers and conversion · Testing
prod[t]Product of all elements (float)Math: reductions and linear algebra
argmax[t]Index of maximum element (int)Math: reductions and linear algebra · Math: tensors
argmin[t]Index of minimum element (int)Math: reductions and linear algebra

All reductions except argmax/argmin accept an optional axis parameter: sum[t, axis] reduces along that axis and returns a tensor instead of a scalar.

Sorting & Selection

FunctionReturnsExample
argsort[t]The indices that would sort the numbers, ascending: a list of ints, as range answers one, so xs[order[0]] reads the smallest (it had answered a tensor, whose items read as floats and indexed nothing)Math: reductions and linear algebra
topk[t, k]Top k largest values, sorted descending (NumArray)Math: reductions and linear algebra
unique[t]Unique values, sorted (NumArray)Frames: use frame · Math: reductions and linear algebra
where[cond, a, b]Element-wise: a where cond≠0, else b (NumArray); cond a mask too — where[v gt 15.0, v, 0.0 * v] — as a mask is numbers where numbers are asked (true 1, false 0; sum[v gt 15.0] counts)Frames: use frame · Math: reductions and linear algebra · Math: tensors · Project: Analyzing Data

Note: sort[t] is a core builtin (not in the math module) that works on both arrays and tensors.

Cumulative Ops

FunctionReturnsExample
cumsum[t]Cumulative sum (NumArray, same shape)Math: reductions and linear algebra
cumprod[t]Cumulative product (NumArray, same shape)Math: reductions and linear algebra

Combining Ops

FunctionReturnsExample
stack[tensors]Stack tensors along new axis 0 (NumArray)Frames: use frame · Math: tensors · Views: the whole element vocabulary · View Blocks · Reactive State and Events · Slow Work and the Live Loop · Testing a Live App · Charts and Styling · The Element Vocabulary · Derivations
stack[tensors, axis]Stack tensors along new axis (NumArray)Frames: use frame · Math: tensors · Views: the whole element vocabulary · View Blocks · Reactive State and Events · Slow Work and the Live Loop · Testing a Live App · Charts and Styling · The Element Vocabulary · Derivations

Note: concat[a, b, axis] is a core builtin (not in the math module) — one merge operation for all arrays and tensors. It replaced the former append.

Note: slice[t, start, end] is a core builtin (not in the math module) that works on arrays, tensors, and strings.

Broadcasting

Element-wise operations on tensors with different shapes automatically broadcast following NumPy rules:

  • Dimensions are right-aligned
  • Size-1 dimensions expand to match the other tensor
  • Missing dimensions are treated as size 1
use math
a = reshape[linspace[1, 3, 3], 3, 1]   --- shape [3, 1]
b = reshape[linspace[10, 40, 4], 1, 4]  --- shape [1, 4]
c = a + b                                          --- shape [3, 4]

Broadcasting works with all element-wise operators: +, -, .*, ./, .^.

Incompatible shapes (e.g. [3] + [4]) are refused before the program runs where both shapes are known (see Tensor Arithmetic), and stop the program where it runs where they are not, with the same words in both modes.

Advanced Indexing

Tensors can be indexed with another tensor to gather elements by index:

a = linspace[10, 50, 5]
indices = linspace[0, 2, 3]
y = a[indices]                    --- gathers elements at indices 0, 1, 2

Negative indices are supported (wrap around from the end). The result tensor has the same shape as the index tensor.

Shape Operations

FunctionDescriptionExample
reshape[t, d1, d2, ...]Reshape to new dimensionsMath: tensors
flatten[t]Flatten to 1DAutomatic differentiation · Math: tensors
transpose[t]Transpose (swap last two axes)Math: reductions and linear algebra · Math: tensors

Linear Algebra

FunctionDescriptionExample
a * bMatrix multiplication (use * operator)JSON · Math: random, signal, special, and sparse · Statistics: use math.stats · The standard library's layer: use sys · Views: the whole element vocabulary · Defining and Calling Functions · Writing Your Own Modules · Reactive State and Events · Testing a Live App · Charts and Styling · The Element Vocabulary
solve[a, b]Solve linear system Ax = bMath: reductions and linear algebra · Math: tensors
inv[a]Matrix inverseMath: reductions and linear algebra
det[a]Determinant (returns float)Math: reductions and linear algebra · Math: tensors
svd[a]SVD → returns [U, S, Vt]Math: reductions and linear algebra
qr[a]QR decomposition → returns [Q, R]Math: reductions and linear algebra
cholesky[a]Cholesky (L*L^T) for symmetric positive-definiteMath: reductions and linear algebra
eigen[a]Eigenvalues → returns [real, imag]Math: reductions and linear algebra
norm[x]L2 (Euclidean) norm (returns float)Math: reductions and linear algebra
norm[x, p]Lp norm (p=1 for L1, inf for L∞)Math: reductions and linear algebra
dot[a, b]Vector dot product (inner product, returns float)Math: reductions and linear algebra
pinv[a]Moore-Penrose pseudo-inverseMath: reductions and linear algebra
lstsq[a, b]Least-squares solve: minimize ‖Ax − b‖²Math: reductions and linear algebra
triu[a]Upper triangular part of matrixMath: reductions and linear algebra
tril[a]Lower triangular part of matrixMath: reductions and linear algebra
rank[a]Matrix rank (count of singular values above tolerance)Math: reductions and linear algebra
cond[a]Condition number (largest singular value / smallest)Math: reductions and linear algebra

Random & Distributions

FunctionDescriptionExample
seed[n]Set the program's RNG seed: every later draw, tensors and the core rand[] alike, is repeatable and identical in both modes. Statements run in the order written, and a loop that draws runs in order (§14), so a seeded program draws the same numbers on every runMath: random, signal, special, and sparse · Math: tensors
randn[d1, d2, ...]Standard normal (mean=0, std=1): Box–Muller over two uniform draws a value, written in Crow (src/modules/math.co, design rule 20); a negative size stops the programMath: tensors
normal[mean, std, d1, d2, ...]Normal with custom mean/std: mean + std · randn, written in Crow; a negative std stops the programMath: random, signal, special, and sparse
uniform[low, high, d1, d2, ...]Uniform in [low, high): uniform[0.0, 1.0, 2, 3] is a 2×3 tensor of values in [0, 1)Math: random, signal, special, and sparse
poisson[lambda, d1, d2, ...]Poisson distributionMath: random, signal, special, and sparse
bernoulli[p, d1, d2, ...]Bernoulli (0.0 or 1.0)Math: random, signal, special, and sparse
gamma_dist[alpha, beta, d1, ...]Gamma distributionMath: random, signal, special, and sparse
beta_dist[alpha, beta, d1, ...]Beta distributionMath: random, signal, special, and sparse
exponential[lambda, d1, ...]Exponential distributionMath: random, signal, special, and sparse
shuffle[x]Random permutation of tensor elementsMath: random, signal, special, and sparse
choice[x, n]Random sample of n elements (no replacement)Math: random, signal, special, and sparse
permutation[n]Random permutation of 0..nMath: random, signal, special, and sparse

rand is core's: rand[] is one float in [0, 1), and rand[n] and rand[min, max] are ints (see Core Builtins). A tensor of values in [0, 1) is uniform[0.0, 1.0, d1, …].

Design Note: no tensor rand. Considered: rand[d1, d2, …] for a tensor of uniform values in [0, 1), as NumPy spells it. The math module had it until March 2026, when its functions became callable without math. and core's rand kept the name; this table went on listing it, and its examples made ints (rand[2, 3] is 2 or 3). Rejected: rand[5] and rand[2, 3] are core's, an int below 5 and an int from 2 to 3, so the same call would mean two things, and use math would change what a program computes. Decided: uniform[0.0, 1.0, …] makes the tensor, the one way to.

Signal Processing

FunctionDescriptionExample
fft[x]1D FFT → returns [real, imag] tensorsMath: random, signal, special, and sparse
ifft[real, imag]Inverse 1D FFT → returns real tensorMath: random, signal, special, and sparse
fft2[m]2D FFT → returns [real, imag] tensorsMath: random, signal, special, and sparse
conv[a, b]1D convolution (full), length = len(a)+len(b)-1Math: random, signal, special, and sparse
conv2d[a, b]2D convolution (full)Math: random, signal, special, and sparse
hamming[n]Hamming window of length nMath: random, signal, special, and sparse
hanning[n]Hanning (Hann) window of length nMath: random, signal, special, and sparse
stft[x, window_size, hop_size]Short-Time Fourier Transform → [real, imag] 2D tensors [frames × window_size]Math: random, signal, special, and sparse
spectrogram[x, window_size, hop_size]Power spectrogram (magnitude² of STFT) → 2D tensorMath: random, signal, special, and sparse
lowpass[x, cutoff_hz, sample_rate]FFT-based lowpass filterMath: random, signal, special, and sparse
highpass[x, cutoff_hz, sample_rate]FFT-based highpass filterMath: random, signal, special, and sparse
bandpass[x, low_hz, high_hz, sample_rate]FFT-based bandpass filterMath: random, signal, special, and sparse

Special Functions

FunctionDescriptionExample
gamma[x]Gamma function Γ(x), element-wiseMath: random, signal, special, and sparse · The standard library's layer: use sys
erf[x]Error function erf(x), of a number or element-wise over a tensor (it had taken a tensor only)Math: random, signal, special, and sparse
fma[a, b, c]a × b + c rounded once: the fused multiply-add a compiled loop accumulates with (pandas's rolling kernels, scikit-learn's row norms, scipy's sparse products), so a sum held to one of them runs with it — total = fma[x, x, total]Math: random, signal, special, and sparse
bessel[x, n]Bessel function J_n(x), element-wiseMath: random, signal, special, and sparse
factorial[x]Factorial x! = Γ(x+1), element-wiseMath: random, signal, special, and sparse
choose[n, k]Binomial coefficient C(n,k), element-wiseMath: random, signal, special, and sparse · The Element Vocabulary

Complex Numbers

Complex values are represented as [real_tensor, imag_tensor] pairs.

FunctionDescriptionExample
complex[re, im]Create complex value → [real, imag]Math: random, signal, special, and sparse
real[c]Extract real part tensorMath: random, signal, special, and sparse
imag[c]Extract imaginary part tensorMath: random, signal, special, and sparse
magnitude[c]Magnitude |c| = sqrt(re² + im²)Math: random, signal, special, and sparse
phase[c]Phase angle = atan2(im, re)Math: random, signal, special, and sparse
conjugate[c]Complex conjugate → [re, -im]Math: random, signal, special, and sparse

Sparse Arrays

Sparse matrices store only non-zero entries, using CSR (Compressed Sparse Row) format internally. They use the same operators as dense arrays — the runtime dispatches to sparse-optimized algorithms automatically.

FunctionDescriptionExample
sparse[dense_array]Convert dense 2D array to sparseMath: random, signal, special, and sparse
sparse[rows, cols, vals, shape]Create sparse from COO triplets (row indices, column indices, values, [nrows, ncols])Math: random, signal, special, and sparse
dense[s]Convert sparse matrix back to dense arrayMath: random, signal, special, and sparse
nnz[s]Number of stored non-zero entriesMath: random, signal, special, and sparse
spmv[s, v]Sparse matrix × dense vector (the same product as s * v)Math: random, signal, special, and sparse
s * vSparse × dense matmul (vector or matrix)Arrays · Bits and character codes: use bits · Documentation: use doc · Files and directories · Frames: use frame · Automatic differentiation · Structured files: use io · A language model as a connection: use llm · Maps · Math: reductions and linear algebra · Math: random, signal, special, and sparse · Math: tensors · Numbers and conversion · Regular expressions · Strings · The standard library's layer: use sys · The system: shell, environment, time, arguments · Views: the whole element vocabulary · Web: responses and submodules · Strings and Interpolation · Arrays and Tensors · Maps Are Dictionaries · Errors Have No Truth Value · Reactive State and Events · Testing a Live App · Charts and Styling · The Element Vocabulary · Derivations · Views and Live Updates
s + s2Sparse + sparse additionArrays · Bits and character codes: use bits · Documentation: use doc · Files and directories · Frames: use frame · Automatic differentiation · Structured files: use io · A language model as a connection: use llm · Maps · Math: reductions and linear algebra · Math: random, signal, special, and sparse · Math: tensors · Numbers and conversion · Regular expressions · Strings · The standard library's layer: use sys · The system: shell, environment, time, arguments · Views: the whole element vocabulary · Web: responses and submodules · Strings and Interpolation · Arrays and Tensors · Maps Are Dictionaries · Errors Have No Truth Value · Reactive State and Events · Testing a Live App · Charts and Styling · The Element Vocabulary · Derivations · Views and Live Updates
solve[s, b]Solve sparse linear system s·x = bMath: reductions and linear algebra · Math: tensors
use math

--- dense to sparse
s = sparse[eye[3]]
log[s]                              --- sparse[3x3, nnz=3]

--- COO creation
s2 = sparse[[0, 1, 2], [0, 1, 2], [5, 6, 7], [3, 3]]

--- sparse matmul
r = s * [1, 2, 3]

--- sparse add
s3 = s + s2

--- back to dense
d = dense[s3]

--- sparse solve
x = solve[s2, [10, 12, 14]]

Data Loading

FunctionDescriptionExample
load[path]Load a table of numbers directly into a 2D tensor: a CSV file, or JSON records or Parquet, from a file, a URL or an S3 object (error-value on failure)Databases: use db · Frames: use frame · Web: responses and submodules · Project: Analyzing Data · Reactive State and Events

load[path] reads a CSV file with a header row and parses all values as floats into a 2D tensor (rows × columns). This is much faster than csv[path] (io module) for numeric data because it avoids creating intermediate string maps.

use math

data = load['data.csv']
log[data.shape]        --- [1000, 10]
log[sum[data]]         --- total of all values

Constants

ConstantDescriptionExample
piπ = 3.14159...Web: responses and submodules
eEuler's number e = 2.71828...Arrays · Bits and character codes: use bits · Databases: use db · Documentation: use doc · Files and directories · Frames: use frame · Automatic differentiation · Structured files: use io · JSON · Maps · Math: reductions and linear algebra · Math: random, signal, special, and sparse · Math: tensors · Moments and freshness · Neural-network building blocks: use math.nn · Numbers and conversion · Statistics: use math.stats · Strings · The standard library's layer: use sys · Views: the whole element vocabulary · Web: responses and submodules · Web: a JSON route · Data Types · Strings and Interpolation · Defining and Calling Functions · Structs Are Records · for as an Expression · Searching with any, all, and find · Writing Your Own Modules · Testing · Project: Analyzing Data · View Blocks · Reactive State and Events · Components · Slow Work and the Live Loop · Testing a Live App · Charts and Styling · The Element Vocabulary · Derivations · Views and Live Updates
infPositive infinity
nanNot a number

Properties

PropertyDescriptionExample
.shapeArray of dimension sizesArrays · Bits and character codes: use bits · Databases: use db · Documentation: use doc · Files and directories · Formatting · Frames: use frame · Automatic differentiation · Structured files: use io · JSON · A language model as a connection: use llm · Maps · Math: reductions and linear algebra · Math: random, signal, special, and sparse · Math: tensors · Moments and freshness · Neural-network building blocks: use math.nn · Numbers and conversion · Regular expressions · Statistics: use math.stats · Strings · The standard library's layer: use sys · The system: shell, environment, time, arguments · Views: the whole element vocabulary · Web: responses and submodules · Web: a JSON route · Hello, World! · Programming a Guessing Game · Variables · Data Types · Strings and Interpolation · Comments · Control Flow · Defining and Calling Functions · Named Arguments · Function Scope Isolation · Arrays and Tensors · Maps Are Dictionaries · Structs Are Records · for as an Expression · Searching with any, all, and find · Controlling Resources · Every Value Has Status · Propagation · Errors Have No Truth Value · Handling Errors Explicitly · Importing with use · Aliased Imports · Names Are Never Ambiguous · Writing Your Own Modules · Testing · Project: Analyzing Data · Working with Databases · View Blocks · Reactive State and Events · Components · Slow Work and the Live Loop · Testing a Live App · Charts and Styling · The Element Vocabulary · Derivations · Loading and Shaping the Data · The Database Layer · Views and Live Updates
.lenIts length, as len[t] gives it: a vector's numbers, a matrix's rowsArrays · Bits and character codes: use bits · Databases: use db · Documentation: use doc · Files and directories · Formatting · Frames: use frame · Automatic differentiation · Structured files: use io · JSON · A language model as a connection: use llm · Maps · Math: reductions and linear algebra · Math: random, signal, special, and sparse · Math: tensors · Moments and freshness · Neural-network building blocks: use math.nn · Numbers and conversion · Regular expressions · Statistics: use math.stats · Strings · The standard library's layer: use sys · The system: shell, environment, time, arguments · Views: the whole element vocabulary · Web: responses and submodules · Web: a JSON route · Hello, World! · Programming a Guessing Game · Variables · Data Types · Strings and Interpolation · Comments · Control Flow · Defining and Calling Functions · Named Arguments · Function Scope Isolation · Arrays and Tensors · Maps Are Dictionaries · Structs Are Records · for as an Expression · Searching with any, all, and find · Controlling Resources · Every Value Has Status · Propagation · Errors Have No Truth Value · Handling Errors Explicitly · Importing with use · Aliased Imports · Names Are Never Ambiguous · Writing Your Own Modules · Testing · Project: Analyzing Data · Working with Databases · View Blocks · Reactive State and Events · Components · Slow Work and the Live Loop · Testing a Live App · Charts and Styling · The Element Vocabulary · Derivations · Loading and Shaping the Data · The Database Layer · Views and Live Updates
.dtypeData type ('float')Arrays · Bits and character codes: use bits · Databases: use db · Documentation: use doc · Files and directories · Formatting · Frames: use frame · Automatic differentiation · Structured files: use io · JSON · A language model as a connection: use llm · Maps · Math: reductions and linear algebra · Math: random, signal, special, and sparse · Math: tensors · Moments and freshness · Neural-network building blocks: use math.nn · Numbers and conversion · Regular expressions · Statistics: use math.stats · Strings · The standard library's layer: use sys · The system: shell, environment, time, arguments · Views: the whole element vocabulary · Web: responses and submodules · Web: a JSON route · Hello, World! · Programming a Guessing Game · Variables · Data Types · Strings and Interpolation · Comments · Control Flow · Defining and Calling Functions · Named Arguments · Function Scope Isolation · Arrays and Tensors · Maps Are Dictionaries · Structs Are Records · for as an Expression · Searching with any, all, and find · Controlling Resources · Every Value Has Status · Propagation · Errors Have No Truth Value · Handling Errors Explicitly · Importing with use · Aliased Imports · Names Are Never Ambiguous · Writing Your Own Modules · Testing · Project: Analyzing Data · Working with Databases · View Blocks · Reactive State and Events · Components · Slow Work and the Live Loop · Testing a Live App · Charts and Styling · The Element Vocabulary · Derivations · Loading and Shaping the Data · The Database Layer · Views and Live Updates
.deviceWhere the tensor lives ('cpu' or 'gpu')Arrays · Bits and character codes: use bits · Databases: use db · Documentation: use doc · Files and directories · Formatting · Frames: use frame · Automatic differentiation · Structured files: use io · JSON · A language model as a connection: use llm · Maps · Math: reductions and linear algebra · Math: random, signal, special, and sparse · Math: tensors · Moments and freshness · Neural-network building blocks: use math.nn · Numbers and conversion · Regular expressions · Statistics: use math.stats · Strings · The standard library's layer: use sys · The system: shell, environment, time, arguments · Views: the whole element vocabulary · Web: responses and submodules · Web: a JSON route · Hello, World! · Programming a Guessing Game · Variables · Data Types · Strings and Interpolation · Comments · Control Flow · Defining and Calling Functions · Named Arguments · Function Scope Isolation · Arrays and Tensors · Maps Are Dictionaries · Structs Are Records · for as an Expression · Searching with any, all, and find · Controlling Resources · Every Value Has Status · Propagation · Errors Have No Truth Value · Handling Errors Explicitly · Importing with use · Aliased Imports · Names Are Never Ambiguous · Writing Your Own Modules · Testing · Project: Analyzing Data · Working with Databases · View Blocks · Reactive State and Events · Components · Slow Work and the Live Loop · Testing a Live App · Charts and Styling · The Element Vocabulary · Derivations · Loading and Shaping the Data · The Database Layer · Views and Live Updates
.gradGradient status ('none' if no gradient)Arrays · Bits and character codes: use bits · Databases: use db · Documentation: use doc · Files and directories · Formatting · Frames: use frame · Automatic differentiation · Structured files: use io · JSON · A language model as a connection: use llm · Maps · Math: reductions and linear algebra · Math: random, signal, special, and sparse · Math: tensors · Moments and freshness · Neural-network building blocks: use math.nn · Numbers and conversion · Regular expressions · Statistics: use math.stats · Strings · The standard library's layer: use sys · The system: shell, environment, time, arguments · Views: the whole element vocabulary · Web: responses and submodules · Web: a JSON route · Hello, World! · Programming a Guessing Game · Variables · Data Types · Strings and Interpolation · Comments · Control Flow · Defining and Calling Functions · Named Arguments · Function Scope Isolation · Arrays and Tensors · Maps Are Dictionaries · Structs Are Records · for as an Expression · Searching with any, all, and find · Controlling Resources · Every Value Has Status · Propagation · Errors Have No Truth Value · Handling Errors Explicitly · Importing with use · Aliased Imports · Names Are Never Ambiguous · Writing Your Own Modules · Testing · Project: Analyzing Data · Working with Databases · View Blocks · Reactive State and Events · Components · Slow Work and the Live Loop · Testing a Live App · Charts and Styling · The Element Vocabulary · Derivations · Loading and Shaping the Data · The Database Layer · Views and Live Updates
use math

a = zeros[3, 3]
b = eye[3]
c = a * b
d = det[b]           --- 1.0

--- constants
log[pi]               --- 3.141592653589793

--- properties
log[a.shape]               --- [3, 3]
log[a.dtype]               --- float
log[a.device]              --- cpu

Generated by crow test --docs --write from the language specification, section 11 and 13. Edit the spec, not this page.