Skip to main content

SplineOps

Projection-based antialiased resizing for N-D scientific arrays.

SplineOps is designed for precise, repeatable downsampling of regular-grid 2-D images and 3-D volumes. It combines explicit coordinate semantics, a readable Python reference implementation, a native CPU backend, and reusable plans for fixed-geometry workloads.

Installation

SplineOps requires Python 3.11 or newer:

python -m pip install splineops

Published wheels include the native resize extension on supported platforms.

Quick start

import numpy as np
from splineops import resize

volume = np.random.default_rng(0).random((64, 192, 192), dtype=np.float32)
coarse = resize(
    volume,
    output_size=(32, 96, 96),
    method="cubic-antialiasing",
)

The *-antialiasing methods project the input spline onto a coarser spline space instead of treating downsampling as interpolation alone. For repeated arrays with the same geometry, ResizePlan reuses setup and workspace state.

When to use SplineOps

SplineOps is a good fit when:

  • continuous-valued 2-D or 3-D NumPy data must be downsampled;
  • coordinate, boundary, and output-shape semantics must be explicit;
  • aliasing matters; or
  • many arrays share one resize geometry.

Another tool may be a better fit when:

  • differentiable GPU execution is required;
  • physical-space image metadata must be managed automatically;
  • ordinary display-image scaling is the only goal; or
  • categorical labels are being resampled, where nearest-neighbour semantics are normally appropriate.

Public maturity

Module Status Public position
resize, ResizePlan Stable Native N-D interpolation and projection antialiasing with a Python reference path
TensorSpline Stabilizing Continuous tensor-product models evaluated at arbitrary coordinates
Affine, differentials, smoothing, regression, pyramids, wavelets Experimental Available for research while their contracts and reference coverage mature

Experimental describes API and validation maturity, not the importance of the underlying methods. See the project status for exact evidence and remaining graduation work.

Numerical and performance position

SplineOps does not claim to be the fastest generic 2-D image resizer. OpenCV, PyTorch, or other libraries can be faster when their coordinate, boundary, kernel, and antialiasing conventions are acceptable.

SplineOps is strongest when the spline model matters: defined grids and boundaries, N-D projection antialiasing, native/reference parity, and repeated fixed-geometry execution. Cross-library reports include semantic differences as well as timings; numerical difference from SplineOps is not treated as an independent accuracy metric.

Backends

  • NumPy is supported across the package.
  • The native C++ backend accelerates resize on CPU.
  • CuPy interoperability is experimental and limited to parts of TensorSpline.

Set SPLINEOPS_ACCEL=never to force the Python resize reference or SPLINEOPS_ACCEL=always to require the native extension. See the backend contract for exact scope.

Documentation

SplineOps modernizes spline methods developed across the Biomedical Imaging Group at EPFL and its collaborators. Method citations, implementation history, and source provenance are recorded explicitly.

Development

git clone https://github.com/splineops/splineops.git
cd splineops
python -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[dev]'
python -m pytest -q

Reproducible resize evidence commands include:

python scripts/benchmark_resize_pr.py --profile smoke --output-dir /tmp/splineops-smoke
python scripts/benchmark_resize_native.py --backend both --output-csv /tmp/splineops-native.csv
python scripts/benchmark_resize_libraries.py --output-csv /tmp/splineops-libraries.csv

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

splineops-2.1.0.tar.gz (2.1 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

splineops-2.1.0-cp313-cp313-win_amd64.whl (595.8 kB view details)

Uploaded CPython 3.13Windows x86-64

splineops-2.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (520.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

splineops-2.1.0-cp313-cp313-macosx_11_0_arm64.whl (402.3 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

splineops-2.1.0-cp313-cp313-macosx_10_13_x86_64.whl (462.1 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

splineops-2.1.0-cp312-cp312-win_amd64.whl (595.7 kB view details)

Uploaded CPython 3.12Windows x86-64

splineops-2.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (520.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

splineops-2.1.0-cp312-cp312-macosx_11_0_arm64.whl (402.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

splineops-2.1.0-cp312-cp312-macosx_10_13_x86_64.whl (462.0 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

splineops-2.1.0-cp311-cp311-win_amd64.whl (592.2 kB view details)

Uploaded CPython 3.11Windows x86-64

splineops-2.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (519.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

splineops-2.1.0-cp311-cp311-macosx_11_0_arm64.whl (400.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

splineops-2.1.0-cp311-cp311-macosx_10_13_x86_64.whl (460.4 kB view details)

Uploaded CPython 3.11macOS 10.13+ x86-64

File details

Details for the file splineops-2.1.0.tar.gz.

File metadata

  • Download URL: splineops-2.1.0.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for splineops-2.1.0.tar.gz
Algorithm Hash digest
SHA256 1e4cb255d44b77aacafca49f717f1e0040a0dc14b19c9a82798660b8eb0fba01
MD5 bceb8b584d845a29a329b45af6c18c0a
BLAKE2b-256 855ea60bc517dcfb4ecbc436a7925e48df3c6dbdb86754cf5f6408cfa4436691

See more details on using hashes here.

Provenance

The following attestation bundles were made for splineops-2.1.0.tar.gz:

Publisher: release.yml on splineops/splineops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file splineops-2.1.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: splineops-2.1.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 595.8 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for splineops-2.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 66108a549bca10d59dc6a3a422de3a8f320a49f4c6cc257740cddf7214ec8427
MD5 79a4a485bfeecfcfa49e54b497af03b2
BLAKE2b-256 1589da338c53af5898a783393f9fceed2dfb5abe925d12317504764ce67bd77d

See more details on using hashes here.

Provenance

The following attestation bundles were made for splineops-2.1.0-cp313-cp313-win_amd64.whl:

Publisher: release.yml on splineops/splineops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file splineops-2.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for splineops-2.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c122dcde8fbea6d35c3b67ec8770a8f995c8712e68968995ad39885013174632
MD5 b6c6a0564a6dcfa7b57b2bd67a7bd65e
BLAKE2b-256 fd28099d49bc644b4f3c87d31f0458e4722201ddce871dea1c30e3925007dd20

See more details on using hashes here.

Provenance

The following attestation bundles were made for splineops-2.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on splineops/splineops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file splineops-2.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for splineops-2.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 146b622d455de6a57c8a9d428b14c230c44ceeed054f9787bf9140628c36b6c3
MD5 b54c9bd9ce3ab960248b5a0aed4d5f64
BLAKE2b-256 f8d02bd668607d686de870106c1d290e1cb8582b84044014e97375b8cd419191

See more details on using hashes here.

Provenance

The following attestation bundles were made for splineops-2.1.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: release.yml on splineops/splineops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file splineops-2.1.0-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for splineops-2.1.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 2ef29b2b9951ab1099696df347ae0d84d837ab4b264e80a6c0ec36890df3cfb9
MD5 c667e050006512f6e1f93edc573e66dd
BLAKE2b-256 b5a0b1d134cbf76af52b404168747d4dd8fac33f57d25e64b87775b9b98c8da7

See more details on using hashes here.

Provenance

The following attestation bundles were made for splineops-2.1.0-cp313-cp313-macosx_10_13_x86_64.whl:

Publisher: release.yml on splineops/splineops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file splineops-2.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: splineops-2.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 595.7 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for splineops-2.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b0e38fd135bc7ceee993b87f1d299343013568da6c702ef8d99c0dcfa9e66df2
MD5 bfb01a6c6e8cddbcb962edd65183bf59
BLAKE2b-256 b059328b4e8d8df6a48931a20d5b036fe07927296f0f3bd01f27ffc075a29651

See more details on using hashes here.

Provenance

The following attestation bundles were made for splineops-2.1.0-cp312-cp312-win_amd64.whl:

Publisher: release.yml on splineops/splineops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file splineops-2.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for splineops-2.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c1126b36936302314c9f3e97ecfc62ccbd477e552117ef421d47336b8ad8347f
MD5 f3abcdcce04fa607d8bbad59a706005e
BLAKE2b-256 50fa541fb9cfc9b72b03fc77cc9fe83151571fe26353687ba24e063dd2e76edd

See more details on using hashes here.

Provenance

The following attestation bundles were made for splineops-2.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on splineops/splineops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file splineops-2.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for splineops-2.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9b828f3ddcd360f6c4f479c65502fa10c03235c7a9dc079f8f9cb4fe026a0526
MD5 dd1f54206f93a7afdfff104227751752
BLAKE2b-256 e9ca92c9be492932742c09fdc1c2683e340226525df904738348e8bca6a3c506

See more details on using hashes here.

Provenance

The following attestation bundles were made for splineops-2.1.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on splineops/splineops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file splineops-2.1.0-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for splineops-2.1.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 7eb82d22ee8a72f7cbb6a6ebaeeb95894e17ec17b991401591a5e99753cc0ec0
MD5 311c0a157e9573ce4bd98105709a31a1
BLAKE2b-256 0815ed4ccb8e913c0976ad5292cd9646f846c4bdb16b316f4714fcd58b17809e

See more details on using hashes here.

Provenance

The following attestation bundles were made for splineops-2.1.0-cp312-cp312-macosx_10_13_x86_64.whl:

Publisher: release.yml on splineops/splineops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file splineops-2.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: splineops-2.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 592.2 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for splineops-2.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 85addf484b78e78555c24035c57997da79a58464973127c667ba124bd5438d56
MD5 24dbef77bc3e5207e363a75ed587d44c
BLAKE2b-256 093f37a9fc128cf56d1ba70493d93bf31111fa1f264b27758bff533c102ac0c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for splineops-2.1.0-cp311-cp311-win_amd64.whl:

Publisher: release.yml on splineops/splineops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file splineops-2.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for splineops-2.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b4e7c3f6a869647ce3710b93d5121f90f7ae14419d84673c243b3ae839e70859
MD5 02f836aa4ee528fbf315ff2177912fc7
BLAKE2b-256 95a86a0e48ce5a98194bf7a6d61418e6f2d678dece3e094dc2911c354dd3b515

See more details on using hashes here.

Provenance

The following attestation bundles were made for splineops-2.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on splineops/splineops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file splineops-2.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for splineops-2.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ccf15c7ad4aca365eaa189708038244bcf25760f33b4ddbef046de4b4e264fcd
MD5 fef4e37f9e2cd85cee6bdb3720da2f9c
BLAKE2b-256 39c30dd267c30b6d22ffcb910ba0f61563e0d7ea5690d6630376c2746b1e9ab4

See more details on using hashes here.

Provenance

The following attestation bundles were made for splineops-2.1.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on splineops/splineops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file splineops-2.1.0-cp311-cp311-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for splineops-2.1.0-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 bbc57d6fbd81a94d257825ee80dd0b4a102e493e28d7577e342071c723b01c97
MD5 556f829036acb764fc57a42d0c6a8806
BLAKE2b-256 74a8384259f39968a64f4e39b69b31be760513e1dc0b427a86bb26b1e6c55180

See more details on using hashes here.

Provenance

The following attestation bundles were made for splineops-2.1.0-cp311-cp311-macosx_10_13_x86_64.whl:

Publisher: release.yml on splineops/splineops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page