Skip to main content

Composable NumPy-based digital signal processing blocks and pipelines

Project description

npDSP

A small, composable digital signal processing library built on NumPy.

npDSP provides simple DSP blocks that can be combined into pipelines using Python's >> operator.

Installation

Install from PyPI:

pip install npDSP

Or with uv:

uv add npDSP

Quick start

import numpy as np
import npdsp

pipeline = (
    npdsp.Add(1)
    >> npdsp.Multiply(2)
)

x = np.array([1, 2, 3])

y = pipeline(x)

print(y)
# [ 4  6  8]

Blocks can also be given names and accessed through a pipeline:

pipeline = (
    npdsp.Add(1, name="offset")
    >> npdsp.Multiply(2, name="gain")
)

print(pipeline["gain"])

Features

  • NumPy-based signal processing
  • Composable processing blocks
  • Pipeline construction with >>
  • Stateful processing blocks such as Delay
  • Mathematical operations
  • Conversion and utility blocks
  • Type hints
  • Block profiling
  • Sphinx API documentation

Documentation

Documentation is available on Read the Docs.

The documentation includes:

  • Getting Started
  • Concepts
  • API Reference
  • Block reference
  • Core API reference
  • Examples

Development

npDSP uses uv for development and dependency management.

Clone the repository:

git clone https://github.com/mrhiemstra/npDSP.git
cd npDSP

Install the development dependencies:

uv sync

Run the test suite:

uv run pytest

Build the documentation:

uv run sphinx-build -b html docs/source docs/build/html

Build the package:

uv build

Requirements

  • Python 3.10+
  • NumPy 2.2.6+
  • si-prefix 1.3.3+
  • typing-extensions 4.16.0+

License

npDSP is released under the MIT License.

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

npdsp-0.0.1.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

npdsp-0.0.1-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file npdsp-0.0.1.tar.gz.

File metadata

  • Download URL: npdsp-0.0.1.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for npdsp-0.0.1.tar.gz
Algorithm Hash digest
SHA256 40e4dd90df70dd79cea64f731aba34acb2780b0644c326d43695d948ff500c5d
MD5 a20d455d14050dedc7a9a28ae6d84219
BLAKE2b-256 881fa842276ef977eaae507ba4fe2dc638e8889c58bae635ea908d182b14ebf5

See more details on using hashes here.

Provenance

The following attestation bundles were made for npdsp-0.0.1.tar.gz:

Publisher: publish.yml on mrhiemstra/npDSP

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

File details

Details for the file npdsp-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: npdsp-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for npdsp-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9fdcf1e0be004b30768cbc5aae6d2f0b855a29d0c6c508f6b1b8c1847acf7ccd
MD5 9fb8c17fe5aee3601660aa4122ae5097
BLAKE2b-256 c946969bb45cb5eba02c7fecd9124c38d1f543d90a5775938d5095cf0292cfd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for npdsp-0.0.1-py3-none-any.whl:

Publisher: publish.yml on mrhiemstra/npDSP

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