Skip to main content

Build Status Documentation REUSE MIT license

nneuroutil

This is a bag of random utilities that can be used to analyse and visualize data from neuroscience. The focus is mainly on AI implementations of various models and pipelines. It will mainly grow as various needs arise and it does not aim to be a general framework for such problems, as the field is too vast.

There are many frameworks and libraries that can be used for this sort of stuff. For some Python examples, see

  • MNE-Python: Package for exploring, visualizing, and analyzing human neurophysiological data such as MEG, EEG, sEEG, ECoG, and more.

  • Braindecode: Deep learning software to decode EEG, ECG or MEG signals. It builds on MNE-Python.

  • Nilearn: Machine learning and decoding for neuroimaging (e.g. fMRI).

  • NeuroKit2: Generic package for advanced biosignal processing routines.

  • PyRiemann: Generic multivariate data analysis, with a focus on biosignals (EEG, MEG, EMG).

  • PyDMD and PySINDy: More generic dynamics libraries.

Scope

The main driving philosophy of nneuroutil is that it should be backend-agnostic. All current algorithms are implemented against the Array API Standard and work with both mutable backends (e.g. numpy or torch) and immutable backends (e.g. jax).

On top of that, the scope is not to overthrow other libraries. The algorithms that are added here should be either (a) standard and not worth an extra dependency or (b) novel / with different tradeoffs.

An example of this is the LDA algorithm implemented in nneuroutil.classifier, which uses a GSVD-based formulation for rank-deficient problems where the within-class scatter matrix is singular. Unlike scikit-learn’s default SVD-based LDA, it can retain discriminative directions in the null space of that matrix, which can be useful when there are more features than samples.

Install

pip install nneuroutil
# or: uv add nneuroutil

Optional backends are extras: nneuroutil[jax], nneuroutil[torch], and nneuroutil[visualization].

Quick Start

The library contains a few different algorithms and tools for general analysis of (mainly) timeseries data, classification, constructing neural network models, etc.

It’s generally pretty straightforward. For example, the code below shows a standard LDA classifier based on the GSVD algorithm of Howland & Park (2004) that uses jax.

import jax
import jax.numpy as jnp

from nneuroutil.classifier import classify_linear_discriminant_analysis

key = jax.random.PRNGKey(0)
key1, key2 = jax.random.split(key)
features = [
    jax.random.normal(key1, (50, 2)) * 0.5 + jnp.array([-2.0, 0.0]),
    jax.random.normal(key2, (50, 2)) * 0.5 + jnp.array([2.0, 0.0]),
]

clf = classify_linear_discriminant_analysis(features, [0, 1])
print(clf.predict(jnp.array([[1.8, 0.2], [-1.9, -0.1]])))  # [1. 0.]

Metadata

Release files for nneuroutil 0.1.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 nneuroutil 0.1.0
File Size Uploaded Provenance
nneuroutil-0.1.0.tar.gz 86.1 kB With provenance Details

Built distribution (wheel)

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

Total release size: 147.1 kB

Release files / nneuroutil-0.1.0.tar.gz

Download URL nneuroutil-0.1.0.tar.gz
Size 86.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d0e1bd18910b643ed766a874b4c590710502ff2871b2d0850c4e22445a6d2000
BLAKE2b-256 checksum
How to use checksums
473bae4d09a1039aaf522024cc964c0a313fd1e130f719fa23761607bf487b1c
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 24, 2026.

Transparency log

Release files / nneuroutil-0.1.0-py3-none-any.whl

Download URL nneuroutil-0.1.0-py3-none-any.whl
Size 61.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
41e496c8de808573a13cd09cd3de771c52be26a12157f6e506d1a076a8425ef0
BLAKE2b-256 checksum
How to use checksums
f66a53b02468a4dd8f8755368739631b57a8c86468924fffad205c7c5e0740c6
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 24, 2026.

Transparency log

Security for nneuroutil 0.1.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 nneuroutil-0.1.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 24, 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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