Make the mathematics visible.
Executable formulas, inspectable neural networks, and a clearer view of learning.
Documentation · Quick start · API reference · 3.0.0 release notes · Technical review
NeuroGebra is an open-source Python library for learning and experimenting with the mathematics behind machine learning. It brings SymPy formulas, NumPy computation, eager automatic differentiation, neural model building, and training observability into one package.
This checkout targets 3.0.0. The source and release notes are prepared locally; publication is a separate maintainer action. See publishing status.
What you can do
| Area | Explore |
|---|---|
| Symbolic mathematics | 285 formulas across 10 domains, composition, explanations, LaTeX and analytical derivatives |
| Automatic differentiation | Scalar Value and multidimensional Tensor operation graphs |
| Neural models | Dense, Conv2D, pooling, dropout, normalization and residual dense layers |
| Training | Adam, SGD, RMSprop, learning-rate schedules, metrics and model checkpoints |
| Observatory | Training events, formulas, gradients, health checks, summaries and exports |
| Scientific experiments | An educational finite-difference PINN solver for data and equation residuals |
| Native expression kernels | Optional C compilation and NVIDIA CUDA/NVRTC evaluation |
| Data and interoperability | 48 educational loaders, 20 project notebooks and framework-specific adapters |
Neural models and PINNs train using NumPy. Native C/CUDA acceleration applies to supported symbolic expression evaluations. Many named dataset loaders generate synthetic teaching data. See capabilities and limits before interpreting benchmarks or deploying an experiment.
Install
Requires Python 3.9+:
python -m pip install neurogebra
For this source checkout:
python -m pip install -e ".[dev,docs]"
Optional extras include viz, datasets, frameworks, logging, cuda and docs. C compilation requires GCC/Clang, and CUDA needs native NVIDIA driver/NVRTC libraries. The fast extra installs Numba but does not activate a Numba backend. See installation.
Start with a formula
import numpy as np
from neurogebra import MathForge
sigmoid = MathForge().get("sigmoid")
x = np.array([-2.0, 0.0, 2.0])
print(sigmoid.symbolic_expr)
print(sigmoid.eval(x=x))
print(sigmoid.gradient("x").eval(x=0.0)) # 0.25
print(sigmoid.latex())
Train an inspectable model
import numpy as np
from neurogebra import Layer, Model
X = np.linspace(-1.0, 1.0, 64).reshape(-1, 1)
y = 2.0 * X + 1.0
model = Model([Layer("dense", units=1)])
model.compile(loss="mse", optimizer="adam", learning_rate=0.03)
history = model.fit(X, y, epochs=20, batch_size=16, verbose=False)
print(model.predict(X[:3]))
Pass log_level="basic" to compile() to enable training events. Detailed logging gathers more statistics and costs more time.
Explore the documentation
- First program and architecture
- Formula catalog and dataset catalog
- ModelBuilder, optimizers and Observatory
- Native acceleration, PINNs and performance engineering
- Framework bridges and 20 project notebooks
- 3.0 migration guide, troubleshooting and review/roadmap
Develop and contribute
python -m pytest tests -q
python -m mkdocs build --strict
python scripts/check_docs.py --site site
Preview the site with python -m mkdocs serve. After changing formulas or loaders, regenerate the reference catalogs with python scripts/generate_reference.py.
Read CONTRIBUTING.md and the contributor documentation. Report bugs through GitHub Issues, and security problems through the security policy.
Created by Fahim Sarker. Released under the MIT License.
Metadata
Release files for neurogebra 3.0.0
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 |
|---|---|---|---|---|
| neurogebra-3.0.0.tar.gz | 2.2 MB | Without provenance | Details for neurogebra-3.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| neurogebra-3.0.0-py3-none-any.whl | Python 3 | none | any | Details for neurogebra-3.0.0-py3-none-any.whl |
Total release size: 2.3 MB
Release files / neurogebra-3.0.0.tar.gz
| Download URL | neurogebra-3.0.0.tar.gz |
|---|---|
| Size | 2.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed5ea48c028f5733de60c7a18a8bdbdd86a6b82f866893948600b61d3589d438
|
|
BLAKE2b-256 checksum How to use checksums |
82855ebdce9cfcf97c6ded22ae8a515755c49b978c3593de94912ca02a37b88e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.18
|
Release files / neurogebra-3.0.0-py3-none-any.whl
| Download URL | neurogebra-3.0.0-py3-none-any.whl |
|---|---|
| Size | 182.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
11c92f4973fcabdf750f88c5f379463dfbb9295c96faf4ce2bcd052c73328344
|
|
BLAKE2b-256 checksum How to use checksums |
5bac7993bc5403952ce970516896167007dd7dc8c26c213b054ecf78c06fdf07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.18
|
Security for neurogebra 3.0.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.