Metadata-Version: 2.4
Name: dspk
Version: 0.0.5
Requires-Dist: numpy>=2.2
License-File: LICENSE-MIT
License-File: LICENSE-APACHE
Summary: Multi-channel signal processing on any GPU or the CPU, written once in CubeCL
Author: jesusdpa1
License-Expression: MIT OR Apache-2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://github.com/neuro-kitchen/dsp-kitchen

# dspk (Python)

> [!WARNING]
> **Early development.** The bindings are being rewritten; APIs change.

Python bindings of [dspk](https://github.com/neuro-kitchen/dsp-kitchen): multi-channel signal
processing written once in CubeCL, run on any GPU (wgpu, CUDA, HIP) or the CPU, with the device
chosen at run time.

```python
import dspk

dspk.runtime.available()   # e.g. ['wgpu', 'cuda', 'cpu']
dspk.runtime.set("cuda")   # every later call runs on CUDA unless given runtime=
```

## Development

From this folder, with the repository's environment (`uv sync` at the root):

```bash
uv run --project ../.. maturin develop --profile validate   # build and install dspk
uv run --project ../.. python -m pytest tests                # tests (scipy references)
```

**Stubs.** `python/dspk/_native/**/*.pyi` are generated from the Rust bindings; regenerate them
after changing a binding (`tests/test_stubs.py` fails when they disagree with the extension):

```bash
LIB=$(../../.venv/bin/python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
LD_LIBRARY_PATH=$LIB PYO3_PYTHON=../../.venv/bin/python cargo run --bin stub_gen
```

The generator links `libpython`; `LD_LIBRARY_PATH` points the loader at uv's Python.

