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.2.tar.gz (13.2 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.2-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: npdsp-0.0.2.tar.gz
  • Upload date:
  • Size: 13.2 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.2.tar.gz
Algorithm Hash digest
SHA256 c12f0c6fce0ec08f44c27e2cbd31689f5a39918b6835f3ad510de2ef2e0bf3c7
MD5 e5054e2cd4a2c1974cdedd5210ec37a8
BLAKE2b-256 1130eb2631f28c836b32f0a51676f6eea739b247f8370b22905c40e067046714

See more details on using hashes here.

Provenance

The following attestation bundles were made for npdsp-0.0.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: npdsp-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 19.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7c729d9f66973fa6a25e5a125e05ce793e7cfd0252d5414ce0972aeec72ec1dc
MD5 64b8f2e59d6ecb6eb51b4b1d1845cd3c
BLAKE2b-256 a25fe29cd972be14f97edee91f7abacfef22978605c566626174e9c4c1b55e02

See more details on using hashes here.

Provenance

The following attestation bundles were made for npdsp-0.0.2-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