Skip to main content

Spike Encoders

Branch Codecov CI
Master codecov Python application

Spike encoders for Spiking Neural Network.

This package consists of three types of spike encoders for spatio-temporal data:

  1. Threshold Based Representation (TBR) encoder
  2. Bens Spiker Algorithm (BSA) encoder
  3. Step Forward (SF) encoder

Data

The data given to the encoders are spatio-temporal. Each sample is one csv file. In each file, every column is a feature and the rows are time points.

For example, each file in tests/test-data is one second of EEG from the PhysioNet EEG Motor Movement/Imagery Dataset: 160 rows (time points at 160 Hz) and 14 columns (EEG channels). See its README for details and citation.

Instillation

pip install pyspikes

BSA and Step Forward run faster with Numba installed. The spikes are the same either way:

pip install pyspikes[numba]

Example

from spikes import encoder
from spikes.utility import ReadCSV

data = ReadCSV("tests/test-data").get_samples()["samples"]

bsa = encoder.BSA(data)
print(bsa.get_spikes())

tbr = encoder.TBR(data)
print(tbr.get_spikes())

sf = encoder.StepForward(data)
print(sf.get_spikes())

Contribution

All contributions are welcome.

Issues

Issues can be opened through Github's Issues tab.

Metadata

Release files for pyspikes 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyspikes 0.3.0
File Size Uploaded Provenance Actions
pyspikes-0.3.0.tar.gz 11.0 kB With provenance Details for pyspikes-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyspikes 0.3.0
File Interpreter ABI Platform Actions
pyspikes-0.3.0-py3-none-any.whl Python 3 none any Details for pyspikes-0.3.0-py3-none-any.whl

Total release size: 27.4 kB

Release files / pyspikes-0.3.0.tar.gz

Download URL pyspikes-0.3.0.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
09fb196f72703a026f4d0e02ff786e927349906839877c9c9c034ae607274288
BLAKE2b-256 checksum
How to use checksums
b4c393129b1759ee20be34dc0e5030daae9c2bd6bee951f32d9743d388e09c77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / pyspikes-0.3.0-py3-none-any.whl

Download URL pyspikes-0.3.0-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f2d342c5b566d60763160d51f3131391d97edd69c01a97d1b10c8a1db339fdce
BLAKE2b-256 checksum
How to use checksums
a14316aa112ee50fad8986a159f00749bf8ea1e6e0e88448dcdc1373934abfbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for pyspikes 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyspikes-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page