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 on fastprox's own threads (no OpenMP runtime to clash with PyTorch or others) 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.0rc2, a release candidate

Wheels are abi3 for CPython 3.12 and later on Linux (x86_64, aarch64), macOS (arm64 from 11.0, x86_64 from 10.15) and Windows (amd64), and depend on nothing but NumPy.

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.0rc2

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.0rc2
File Size Uploaded
fastprox-0.1.0rc2.tar.gz 397.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for fastprox 0.1.0rc2
File
fastprox-0.1.0rc2-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details
fastprox-0.1.0rc2-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.0rc2-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 abi3 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details
fastprox-0.1.0rc2-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details
fastprox-0.1.0rc2-cp312-abi3-macosx_10_15_x86_64.whl CPython 3.12 abi3 macOS 10.15+ x86-64 Details

Total release size: 1.5 MB

Release files / fastprox-0.1.0rc2.tar.gz

Download URL fastprox-0.1.0rc2.tar.gz
Size 397.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0279f7d3a1ea02ddc30332f210e2552b0efcd9e4d0425690b2cefd200ddfec37
BLAKE2b-256 checksum
How to use checksums
cce410dbf478b567f3532c32a86f65b73d72fc0eba4ddbb6a26809ce67309fe6
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.0rc2-cp312-abi3-win_amd64.whl

Download URL fastprox-0.1.0rc2-cp312-abi3-win_amd64.whl
Size 338.4 kB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
c15c385d1962475eccd4c112a0b96151a4fe509d287ec76559d3170cd6d5bc0d
BLAKE2b-256 checksum
How to use checksums
d4ff8e63285ec05d0eb7eefc292accc40e419f4fdb3427cbe14de23dc25716d3
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.0rc2-cp312-abi3-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl

Download URL fastprox-0.1.0rc2-cp312-abi3-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Size 282.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
1c07aa7a44591a6400efb7fcb12701524f1ec0da1b2f1dda337ceff1527b0fb8
BLAKE2b-256 checksum
How to use checksums
3c32d5c684a07e9241bc66d31f4c54a0c232942b4f1cd63ad6fb7e1840c25eee
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.0rc2-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL fastprox-0.1.0rc2-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 262.8 kB
Tags CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
0e5cf002db401e967debf44af85e76615b56187f4213404048db659aa86e61e6
BLAKE2b-256 checksum
How to use checksums
7d17ceb6c020e168c119cb45b33dce5e72083d0ee219e459359529df1071f929
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.0rc2-cp312-abi3-macosx_11_0_arm64.whl

Download URL fastprox-0.1.0rc2-cp312-abi3-macosx_11_0_arm64.whl
Size 121.6 kB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5209861a70cf624248398f8d1be751e5ecb3ce1f4749e8de56f4160dfc236c3c
BLAKE2b-256 checksum
How to use checksums
80d31f9971decb36cbea48a9cc76e107dbcb76f6f72ffe67ffcf04569dc9cb97
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.0rc2-cp312-abi3-macosx_10_15_x86_64.whl

Download URL fastprox-0.1.0rc2-cp312-abi3-macosx_10_15_x86_64.whl
Size 143.5 kB
Tags CPython 3.12 abi3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
af00d4252bd41962cf2b89473dc617fa5e17066216781a4febc0deb8a93e807a
BLAKE2b-256 checksum
How to use checksums
0f83c013f68efe31bc0604c48edb0658c128b429fba545f667b6d874a44a651f
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.0rc2 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