Skip to main content

PyPI Python 3.11+ License

ddx

Differentiate expressions built while the program runs. Write a model over named symbols — terms looped over a data file, a model read from configuration, an expression a user typed, a loss that switches shape on a comparison — and ask it for values, gradients, Jacobians and Hessians. One point at a time or a NumPy batch of thousands in a single call, interpreted or compiled to machine code through LLVM.

pip install ddx-ad

The distribution is ddx-ad and the import is ddx; pip install ddx is an unrelated project. There is one wheel per platform and CPython version (3.11–3.14), and a wheel needs nothing installed beside it — LLVM is inside the library.

Wheel JIT
Linux x86_64 (glibc 2.28+) yes
Windows x64 yes

There is no macOS wheel; elsewhere, pip install . from a checkout of the repository builds from source, and needs LLVM 20 installed (-C cmake.define.DDX_BUILD_JIT=OFF builds without it). ddx.has_jit says whether the copy you have was built with the LLVM backend. Everything below works either way; without it, calls interpret.

Models

equation takes a model — a callable of no arguments returning one expression, or a tuple of them for a system — as a call or a decorator:

import ddx

@ddx.equation
def f():
    x = ddx.var("x")
    y = ddx.var("y")
    return ddx.exp(x) * ddx.sin(y)

Symbols are named inside the model with ddx.var(name) and take the order they are named in. f.symbols lists them, f.arity counts them, f.outputs counts the model's outputs. ddx.param(name) is an input that is never differentiated — no Jacobian column — and is supplied with every point after the symbols; f.params lists the parameters and f.inputs everything a point supplies. ddx.implicit(name, residual) is an input the caller solved for, a root of residual(z) — ddx.implicit("z", lambda z: z * z - a) — and every derivative then carries dz/dx = −F_x / F_z, and f.residual(x) evaluates F at a point. A bare number mixes into an expression without wrapping, so an accumulator can start at 0.0:

@ddx.equation
def fit():
    a, b = ddx.var("a"), ddx.var("b")
    loss = 0.0
    for t, y in data:
        loss += (y - a * ddx.exp(-b * t)) ** 2
    return loss
Kind Available
Arithmetic + - * / ** unary - abs()
Unary sin cos tan exp log log10 sqrt cbrt abs sign asin acos atan sinh cosh tanh asinh acosh atanh erf
Binary pow atan2 hypot max min
Comparison < <= > >= == != — each answers 1.0 or 0.0
Conditional select(cond, if_true, if_false)

add, mul, div, neg, lt and le are the operators spelled as functions.

Where a rule has a choice to make, it is made the same way everywhere: abs differentiates to 0 at zero and sign to 0 throughout, max and min give each side half at a tie, and pow(a, b) at a == 0 answers the zeros its constant arms say — a⁰ is 1 and 0ᵇ is 0.

Choosing between two expressions

A comparison is an expression, not a bool, so a model cannot branch on one with if. select is the conditional, and it is not a branch: both arms are evaluated and the condition picks one, so a batch keeps every point on the same path.

@ddx.equation
def capped():
    x = ddx.var("x")
    return ddx.select(x < 1.0, x * x, 2.0 * x - 1.0)   # C¹ at x = 1

The derivative is the taken arm's, and the condition is never differentiated, so the symbols it tests get no partial through it. A condition is any nonzero value; a comparison against NaN is false, while a NaN used directly as a condition is true. A range test is (a < b) * (b < c).

Vectors

An expression can hold a vector or a matrix, one graph node for the whole operation rather than one per element:

@ddx.equation
def quad():
    x = ddx.vec("x", 3)                         # symbols x[0], x[1], x[2]
    C = ddx.mat_constant(coefficients)          # a 2-D array
    return x @ (C @ x) + ddx.sum(x * ddx.log(x))
Function Is
vec(name, n) n symbols name[0] … name[n-1], packed
pack(scalars), vec_constant(data), mat_constant(M) a vector of expressions, a constant vector, a constant matrix from a 2-D array
sum(v), u @ v the reductions to a scalar
M @ v, transpose(M) @ v M·v and Mᵀ·v

Arithmetic and the unary functions apply elementwise, and a scalar or a bare number broadcasts. select takes a whole vector under a scalar condition and element by element under a vector one. len(v) and v.shape give the shape and v[i] an element. Shapes are checked where an expression is formed: a mismatch, or an index past the end, raises errc.tensor_shape. An output is always a scalar: a model that returns a vector raises errc.tensor_shape too, so reduce it or return its elements as a system. A model holding vector nodes compiles like any other: each vector operation is a vectorised loop in the kernel, and the answers agree with the interpreter's to a few ulps, the sums being taken in a different order.

Written down instead

A model can be a string, or a list of strings for a system:

g   = ddx.equation("exp(x) * sin(y)")
sys = ddx.equation(["x*x + y*y - 4", "x*y - 1"])

Free identifiers become the symbols, in the order they first appear. The grammar is Python's arithmetic: + - * /, ** for exponentiation (^ is not an operator), parentheses, unary signs, decimals and exponent notation, and the functions in the table above. Comparisons bind looser than arithmetic, so select(x*x < y + 1, x, y) needs no parentheses, and there is one comparison per expression: a < b < c is refused rather than read. A string that does not parse raises ddx.Error with bad_syntax, unknown_function or wrong_argument_count.

Points

A point is a sequence, or a dict keyed by input name. A 2-D array is a batch — shape (inputs, points), one row per input:

f.jacobian([2.0, 3.0])                      # positional, declaration order
f.jacobian({"x": 2.0, "y": 3.0})            # by name
f.jacobian(np.array([[2.0], [3.0]]))        # a batch of one
f.jacobian(np.array([[2.0, 2.5], [3.0, 3.5]]))   # a batch of two

Values and derivatives

Each call returns everything up to and including what it names, so a gradient never costs a second evaluation:

Call Returns
evaluate(x) f
jacobian(x) (f, J)
gradient(x) J alone, from a graph that does not compute f
hessian(x) (f, J, H)
jvp(v, x) (f, J·v) — the directional derivative of f along v
vjp(w, x) (f, wᵀJ) — the gradient of w · f
hvp(v, x) (f, ∇f, H·v) — the directional derivative of ∇f along v
dense_hessian(x) (f, J, H) — H from one sweep, without colouring
value, gradient = f.jacobian([2.0, 3.0])
value, gradient, hessian = f.hessian([2.0, 3.0])
hessian.shape                               # (2, 2)

value, gradient, hv = f.hvp([1.0, 0.0], [2.0, 3.0])
hv.shape                                    # (2,) — H·v, without forming H

Shapes follow the point: a single point gives a scalar f, an (n,) gradient and an (n, n) Hessian; a batch of p appends that axis, giving (p,), (n, p) and (n, n, p). A system prepends its output axis. The Hessian arrives dense.

The three products never form the matrix they are named after, which is what makes them worth having when n² storage is the problem — though not when speed is, since one product costs about what the whole matrix does. J·v and H·v take a direction over symbols, so it accepts the same spellings a point does — a sequence, a dict, or a (symbols, points) batch alongside a batched point. wᵀJ takes one weight per function, so it is positional only. hvp needs a single-output model, and raises errc.not_single_output on a system.

dense_hessian(x) is for a Hessian whose coupling is dense, such as x @ (C @ x), where colouring needs one sweep per symbol: it carries matrix-valued derivatives forward in one pass instead, and also needs a single-output model.

jacobian_jvp(v, x) answers (f, J, dJ/dv): the Jacobian and its derivative along v, from one forward sweep, for a system as for one function. restrict(names) is a view with only those symbols' Jacobian columns, in symbol order — view.jacobian(x) and view.jacobian_jvp(v, x) answer the same tuples with J narrowed, and the dropped columns are never computed.

Calling in a loop

The calls above allocate their answers. buffer(x) binds the point and the answers once and hands back a Call: write the next point into x, call it, read the blocks back. Same arrays every time, so nothing is allocated per call.

call = f.buffer(np.array([2.0, 3.0]))
for _ in range(steps):
    call()                                  # fills call.value and call.jacobian
    call.x[:] = next_point(call.jacobian)

want chooses how far it goes, and a block nobody asked for is one nobody computes:

want Fills
Want.VALUE value
Want.JACOBIAN (default) value, jacobian
Want.GRADIENT jacobian
Want.HESSIAN value, jacobian, hessian

Reading a block the call did not ask for raises errc.wrong_column_count, and so does binding Want.HESSIAN on a system.

Shapes are the ones the allocating calls answer with, value included: one output at one point is a float, and everything else is an array. The point is bound as an array whatever was passed, so call.x is writable even when the argument was a list.

Errors

ddx.Error is a RuntimeError carrying a code:

try:
    f.jacobian({"z": 1.0})
except ddx.Error as e:
    print(e)                                # "no symbol of that name"
    e.code is ddx.errc.unknown_symbol       # True

errc is an IntEnum, so it compares and formats as its number — e.code.name is the spelling.

errc Means
wrong_arity the point does not supply one value per symbol
wrong_direction a direction does not supply one value per symbol, or a covector one per function
short_point a named point leaves a symbol unreached
unknown_symbol a named point uses a name the equation does not have
wrong_column_count a batch block has the wrong number of columns
outside_equation a symbol was named outside a model
no_graph the model is a bare number, naming no function
name_clash one name used for both a symbol and a parameter
closed_twice, nested_implicit an implicit input named twice, or a residual reading another implicit
not_single_output hvp, dense_hessian or hessian_colours on a system
tensor_shape vector operands of mismatched shapes, an element index past the end, or a vector returned as an output
bad_syntax a string the grammar does not accept
unknown_function a string calls a function that does not exist
wrong_argument_count a string calls one with the wrong arity
jit_target, jit_module, jit_verify, jit_lookup the compiler could not produce or link a kernel
not_compiling compile_status on an equation whose backend is INTERPRET
dense_refused dense_hessian on a model whose matrix the symbols move, such as gemv(exp(outer(x, x)), x); hessian and hvp answer it

Compiling

Options is a frozen pydantic model, validated on the way in. eq.options reads and assigns it; eq.compile() sets backend=COMPILE, waits for the kernel, and returns the equation, so a configure-and-use reads in one line:

f.compile(points=batch.shape[1]).jacobian(batch)
f.uses_kernel()                             # True
f.compile_status()                          # None: compiled
f.options = ddx.Options(backend=ddx.Backend.INTERPRET)   # discards the kernel

compile() sets the options and builds the Jacobian kernel before it returns. Assigning options builds nothing; each lane compiles on its first call, and that call waits for it.

Backend Calls
INTERPRET walk the graph
COMPILE run a kernel compiled on the lane's first call

points is the batch you intend to hand one call, stated because the kernel is built before any call exists to infer it from. It decides the lane width and nothing else: a call carrying some other number is answered correctly, just not by the kernel that number would have built.

Reference

Member Is
arity, outputs, symbols properties — symbol count, output count, names in declaration order
params, inputs properties — the parameters, and every input a point supplies
evaluate(x), __call__(x) f at the point or batch
jacobian(x) (f, J)
gradient(x) J alone
jvp(v, x), vjp(w, x), hvp(v, x) (f, J·v), (f, wᵀJ), (f, ∇f, H·v)
jacobian_jvp(v, x) (f, J, dJ/dv)
restrict(names) a Restricted view: jacobian, jacobian_jvp, symbols, jacobian_columns
hessian(x) (f, J, H), dense
dense_hessian(x) (f, J, H), from one sweep without colouring
residual(x) each implicit's residual F at one point
options property — read or assign an Options
compile(**fields) set Options, block for the kernel, return self
uses_kernel(*, want) whether a call runs compiled code, building it now — for the Jacobian lane unless want names another
compile_status(*, want) None when that lane runs compiled code, else (errc, detail): why it interprets
hessian_colours groups in the Hessian's compression; raises on a system
buffer(x, *, want) a Call bound to its buffers, for a loop
nodes(*, want) how many nodes a call for want evaluates
census(*, want) {"steps", "values", "by_op"}: the steps a call takes and the values they write, by_op as (op, steps, values) rows, most values first; a call costs in proportion to values

License

Boost Software License 1.0. The wheels bundle LLVM (Apache 2.0 with LLVM exception), zlib, zstd and pybind11; THIRD-PARTY-NOTICES.txt holds each licence and ships in the wheel.

Metadata

Release files for ddx-ad 5.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for ddx-ad 5.3.0
File Actions
ddx_ad-5.3.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for ddx_ad-5.3.0-cp314-cp314-win_amd64.whl
ddx_ad-5.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for ddx_ad-5.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
ddx_ad-5.3.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for ddx_ad-5.3.0-cp313-cp313-win_amd64.whl
ddx_ad-5.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for ddx_ad-5.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
ddx_ad-5.3.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for ddx_ad-5.3.0-cp312-cp312-win_amd64.whl
ddx_ad-5.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for ddx_ad-5.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
ddx_ad-5.3.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for ddx_ad-5.3.0-cp311-cp311-win_amd64.whl
ddx_ad-5.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for ddx_ad-5.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Total release size: 158.5 MB

Release files / ddx_ad-5.3.0-cp314-cp314-win_amd64.whl

Download URL ddx_ad-5.3.0-cp314-cp314-win_amd64.whl
Size 17.3 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
0dd9e92c7a703f447ce361f3d99de8bb56521ce1c05c950e4466bea1803421f1
BLAKE2b-256 checksum
How to use checksums
4e1f7391ee6246d390f80e13a0d3b52d6f53a6c8fc2110e7561767284ea07608
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Release files / ddx_ad-5.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL ddx_ad-5.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 22.7 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
490cf6b0eb9dc113d2f33cfd0ae1af61d7625ab74d2cbd2d278cc0795047f248
BLAKE2b-256 checksum
How to use checksums
67139d6f8743d7456094de84ddff9a267f26131903a191ba4ed231af000c1a46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Release files / ddx_ad-5.3.0-cp313-cp313-win_amd64.whl

Download URL ddx_ad-5.3.0-cp313-cp313-win_amd64.whl
Size 16.8 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
9ae8919db2cb13e487b3da3d49eb696ee971824b94af27890e69850463396e0f
BLAKE2b-256 checksum
How to use checksums
dd9e12d5555d88a5d840837602049dbeb2e0ad72fbb537dc28085cb5b8886e5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Release files / ddx_ad-5.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL ddx_ad-5.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 22.7 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
23a54e8636b895924f43962848ee9586bd50962aa2eb8e2927d92592b1138150
BLAKE2b-256 checksum
How to use checksums
6c0f71c3dabee8a28ddc0235df4edc470ec06135117459da359e6055ba85c5cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Release files / ddx_ad-5.3.0-cp312-cp312-win_amd64.whl

Download URL ddx_ad-5.3.0-cp312-cp312-win_amd64.whl
Size 16.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
c315dbd168a86e87c287d923231252c5a46eb7962eed580e96fe17f2a7ad7b39
BLAKE2b-256 checksum
How to use checksums
2833896705df159bc7e38c047cdabe2d1aa5f3fa8ec6c002f345ad8097656160
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Release files / ddx_ad-5.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL ddx_ad-5.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 22.7 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
77e59ce70445a182f14bf331ac9c3754891e21f92a37f8a762fb8f224584a9d8
BLAKE2b-256 checksum
How to use checksums
93927cc1725918dacefad08368e2e506399f83dc99e954aab368b7e19bbd74cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Release files / ddx_ad-5.3.0-cp311-cp311-win_amd64.whl

Download URL ddx_ad-5.3.0-cp311-cp311-win_amd64.whl
Size 16.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
b3d5ce85a9f23b6606e1e046a7ebe40065d8f373c4806dfd9165d9ac3cf7e9d2
BLAKE2b-256 checksum
How to use checksums
2deac60e32e74799f33e110f376f98026f8fa570fa6e65d2cefde3a36574418e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Release files / ddx_ad-5.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL ddx_ad-5.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 22.7 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e2a38e87f73e270efdb2d0bb520c1591ce7d66540088020accd75cd019f95cb3
BLAKE2b-256 checksum
How to use checksums
a768bb89b46069de250d70501d644e3167f86824fd481a7feddb5c80d8822d87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Security for ddx-ad 5.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for ddx_ad-5.3.0-cp314-cp314-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page