Spike Encoders
| Branch | Codecov | CI |
|---|---|---|
| Master |
Spike encoders for Spiking Neural Network.
This package consists of three types of spike encoders for spatio-temporal data:
- Threshold Based Representation (TBR) encoder
- Bens Spiker Algorithm (BSA) encoder
- 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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyspikes-0.3.1.tar.gz | 11.0 kB | With provenance | Details for pyspikes-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyspikes-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for pyspikes-0.3.1-py3-none-any.whl |
Total release size: 27.4 kB
Release files / pyspikes-0.3.1.tar.gz
| Download URL | pyspikes-0.3.1.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b46d279b5598c2ada05ddc6aa0e87bbd7351eedb6c72c5d011971cfde884f3f
|
|
BLAKE2b-256 checksum How to use checksums |
a2b525d1081a41a27279b3582b12c43f699a36b9d86deca293b1568fad7a7da4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 26, 2026.
Transparency logRelease files / pyspikes-0.3.1-py3-none-any.whl
| Download URL | pyspikes-0.3.1-py3-none-any.whl |
|---|---|
| Size | 16.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0a4ea35bcdf68b6bc9f1fedb254440317d96e0a4529eef2647226198996f4bc9
|
|
BLAKE2b-256 checksum How to use checksums |
5139bb0ecb0db6fd2ed8d403aa36b475a1a9cfeb30b7906f137a1054e2b8ae28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 26, 2026.
Transparency logSecurity for pyspikes 0.3.1
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.
Attestation for pyspikes-0.3.1.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 26, 2026.
Transparency logA 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.