Skip to main content

Spline signal processing in N-D with support for GPU computing.

Project description

SplineOps: Spline Operations

splineops is a Python-based N-dimensional signal processing library with support for GPU computing.

Installation

You need at least Python 3.10 to install splineops, and ideally Python 3.12. Python 3.11 is also compatible.

Install minimal dependencies in a dedicated environment (shown here using Mamba).

Create and activate your environment

mamba create -n myenv
mamba activate myenv

Make sure you have the conda-forge channel added to your conda configuration. If not, you can add it using

conda config --add channels conda-forge

Minimal requirements:

mamba install numpy scipy

Simply install splineops using pip.

pip install splineops

To run the examples, matplotlib, pooch (for built-in image datasets) and IPython (for Python UI widgets) will also be required.

mamba install matplotlib pooch IPython

Formatting, type checking, and testing

Formatting and type checking is performed using the following commands

tox -e format
tox -e type

Testing requires a valid environment with a supported Python version and tox installed. Tests can be run with the following command (automatic pick of the Python version).

tox

Tests can also be launched for a specific Python version (must match the one installed in the active environment)

tox -e py310
tox -e py311
tox -e py312

IMPORTANT: Since CI is not implemented, make sure to run, pass and/or fix tox -e format, tox -e type and tox.

Packaging

Using tox (preferred)

tox -e build

Using hatch

hatch build -t wheel

Development environment

Easiest way to install dev dependencies

mamba install numpy scipy matplotlib pooch IPython black mypy tox hatch pytest

Install splineops development environment in editable mode

pip install -e .[dev]

GPU compatibility

You can use splineops with cupy. If a specific CUDA version is required do

mamba install cupy cuda-version=12.3

Install splineops cupy development environment in editable mode

pip install -e .[dev_cupy]

Potential other CuPy libraries (CuPy from Conda-Forge)

mamba install cupy cutensor cudnn nccl

Building the documentation

To build the Sphinx documentation, install splineops doc dependencies

mamba install numpy scipy matplotlib pooch IPython sphinx sphinx-gallery sphinx-prompt sphinx-copybutton sphinx-remove-toctrees pydata-sphinx-theme sphinx-design myst-parser jupyterlite-sphinx jupyterlite-pyodide-kernel

Install splineops doc environment in editable mode

pip install -e .[docs]

Navigate to the docs directory and run the make html command

cd docs
make html

Then, go to docs/_build/html and open index.html to navigate the documentation locally.

If you want to make a "clean" build, go to docs and manually delete the folders _build, auto_examples, gen_modules, notebooks_jupyterlite and the file sg_execution_times.rst. Why isn't this done automatically? Because Sphinx optimizes speed and removes redundant tasks, by not re-creating the examples' notebooks if they have already been created. If you for example modify the name of the examples' files, you will have to delete at least the folder auto_examples. Otherwise, the old examples' files will not have disappeared automatically, and Sphinx will raise an internal warning referring to a toctree.

Project details


Download files

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

Source Distribution

splineops-0.3.6.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

splineops-0.3.6-py3-none-any.whl (34.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: splineops-0.3.6.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for splineops-0.3.6.tar.gz
Algorithm Hash digest
SHA256 7ec53bb372f01748b4c652630b4d3908975563721612e22dcee90e9c7fb61579
MD5 df5ed6e10852b1bd162da6cb1ecd1e2a
BLAKE2b-256 5d5992be6db7445b921ecb18418fc8f0e96501d1bddbd1ad16e946c8c1114f6e

See more details on using hashes here.

File details

Details for the file splineops-0.3.6-py3-none-any.whl.

File metadata

  • Download URL: splineops-0.3.6-py3-none-any.whl
  • Upload date:
  • Size: 34.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for splineops-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 5bbaf53ac18de5c461b9cefc48f3528710af69aa4e969c13711e581b06a633fd
MD5 4f81886adee0ac0feecdc564aa58e510
BLAKE2b-256 895ee2a4bb8fc844c47bbcae7bd04ba7b319a7c0876761e1677cc932547951ee

See more details on using hashes here.

Supported by

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