Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

fastprox

Exact proximal operators and projections with derivatives. A C++17 core behind a plain-C API, with Python bindings.

  • Exact. Direct algorithms (Condat's 1D TV and simplex projection, the taut string, pool-adjacent-violators) instead of iterative solvers.
  • Differentiable. Jacobian-vector and vector-Jacobian products in the input, the step and the operator's parameters, for bilevel learning and implicit differentiation.
  • Batched. Applied along any axis of a float32 or float64 array, with rows processed in parallel by OpenMP and results bit-identical for any number of threads.
  • Permissive. MIT licensed; every kernel is written from the papers.

Install

pip install --pre fastprox     # 0.1.0rc1, a release candidate

Wheels are abi3 for CPython 3.12 and later on Linux (x86_64, aarch64), macOS (arm64 from 14.0, x86_64 from 15.0) and Windows (amd64), with the OpenMP runtime bundled.

Use

import numpy as np
import fastprox as fp

x = np.random.default_rng(0).normal(size=(64, 1000))

z = fp.tv1d(x, gamma=0.5)                 # 1D total variation along the last axis
p = fp.project_simplex(x, radius=1.0)     # each row onto the simplex
s = fp.soft_threshold(x, lam=0.1)

# Operators with derivatives
op = fp.TV1D(weights=0.8)
z, ctx = op.prox(x, 0.5, keep=True)
dz = op.jvp(ctx, dx=np.ones_like(x))      # Jacobian-vector product
gx, grads = op.vjp(ctx, g=x)              # vector-Jacobian product
print(grads.gamma, grads.weights)         # gradients in the step and the weights

Operators (0.1)

Soft thresholding (weighted), elastic net, Huber, group ℓ2, box, nonnegative orthant, ℓ2 ball, simplex, weighted ℓ1 ball, ℓ∞ norm, isotonic regression, and 1D total variation with per-edge weights. Each one has a conjugate prox through the Moreau identity.

Documentation

C library

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build && cmake --install build --prefix /usr/local

Then find_package(fastprox) and link fastprox::fastprox, or use pkg-config --cflags --libs fastprox. The header is include/fastprox.h.

License

MIT

Metadata

Release files for fastprox 0.1.0rc1

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

Source distribution (sdist)

Source distribution for fastprox 0.1.0rc1
File Size Uploaded
fastprox-0.1.0rc1.tar.gz 391.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for fastprox 0.1.0rc1
File
fastprox-0.1.0rc1-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details
fastprox-0.1.0rc1-cp312-abi3-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64, Linux glibc 2.26+ x86-64 Details
fastprox-0.1.0rc1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 abi3 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details
fastprox-0.1.0rc1-cp312-abi3-macosx_15_0_x86_64.whl CPython 3.12 abi3 macOS 15.0+ x86-64 Details
fastprox-0.1.0rc1-cp312-abi3-macosx_14_0_arm64.whl CPython 3.12 abi3 macOS 14.0+ ARM64 Details

Total release size: 2.4 MB

Release files / fastprox-0.1.0rc1.tar.gz

Download URL fastprox-0.1.0rc1.tar.gz
Size 391.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ba7eabfe1cbc3477e3f6a1020bf2cc5636b4685c0ddfbaf6fc630c149fed109b
BLAKE2b-256 checksum
How to use checksums
eff1cee8ae9f92d3d7c23cd741d33f0bab295467a048acf2035366f864228407
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 14, 2026.

Transparency log

Release files / fastprox-0.1.0rc1-cp312-abi3-win_amd64.whl

Download URL fastprox-0.1.0rc1-cp312-abi3-win_amd64.whl
Size 443.1 kB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
3ca3a368520f4f20f01d90c175a5bfd883fcd9a8f38b8ef403e2bbbbf5764224
BLAKE2b-256 checksum
How to use checksums
7dda650757c5a0430cb3af3821fda8601e35b0452b3fab676a1dea6eb89ff88e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 14, 2026.

Transparency log

Release files / fastprox-0.1.0rc1-cp312-abi3-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl

Download URL fastprox-0.1.0rc1-cp312-abi3-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Size 387.0 kB
Tags CPython 3.12 Linux glibc 2.26+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
0544cdec342286775fad41bc27d42889c6cdc914f19711c5eef55817ddcbb523
BLAKE2b-256 checksum
How to use checksums
a7be5bf0d100649b9f9892f123b5e807b79d21032e5a9315714bd7f07869aed2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 14, 2026.

Transparency log

Release files / fastprox-0.1.0rc1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL fastprox-0.1.0rc1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 366.3 kB
Tags CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
e4ba0d3a266c61502cdb255e762d1cbb76b5f83e30614849c5442a3402716f66
BLAKE2b-256 checksum
How to use checksums
7d61c4246475eae7204a113b8f666d2279907082d48c032fafccb4aabdd2a740
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 14, 2026.

Transparency log

Release files / fastprox-0.1.0rc1-cp312-abi3-macosx_15_0_x86_64.whl

Download URL fastprox-0.1.0rc1-cp312-abi3-macosx_15_0_x86_64.whl
Size 419.9 kB
Tags CPython 3.12 abi3 macOS 15.0+ x86-64
SHA-256 checksum
How to use checksums
1857e9b528b11fba3551898da2cf1d272f29da8736b4a528b994b11562f31c68
BLAKE2b-256 checksum
How to use checksums
5fcc110c4171f150ffd62e601002e7bffba9077bd1b0500c91c44e13eeda870a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 14, 2026.

Transparency log

Release files / fastprox-0.1.0rc1-cp312-abi3-macosx_14_0_arm64.whl

Download URL fastprox-0.1.0rc1-cp312-abi3-macosx_14_0_arm64.whl
Size 369.4 kB
Tags CPython 3.12 abi3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
d91a5ed2cf2d660505f9122e4055964ceef5e5fdc4876fd58eeb9c312e2c7c0b
BLAKE2b-256 checksum
How to use checksums
3ea0595b412333bc9968f6b629a36ae49df97ca78932434113b2c3f9e1e80c3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 14, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.0

6 release files

0.1.0

6 release files

This release

0.1.0rc1 This release

6 release files

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