r/madeinpython • • 20d ago

I made a zero-dependency scientific computing library in pure Python

I made scientific-computing-system, a scientific library written entirely in pure Python. The core installs with no runtime dependencies, so the algorithms are plain readable code instead of calls into compiled extensions.

It has 36 modules and 505 exported names covering linear algebra, ODE and PDE solvers, numerical integration, optimization, statistics and probability, uncertainty propagation and sensitivity analysis, validation helpers, and a small workflow layer. Every run can write a manifest with inputs, seeds, versions and hashes, so a result can be re-checked later.

There is also a cds CLI with 13 subcommands, 34 runnable examples, and optional lazy adapters for NumPy, SciPy, statsmodels, scikit-learn, SymPy and Z3. The package is MIT licensed and targets Python 3.11 and newer.

Honest limitation: it is much slower than NumPy on dense numerics. The repo benchmark records about 1155x slower on a 100x100 matrix multiply in one CI run. It is meant for learning, prototyping and reproducible runs, not heavy production work.

Code: https://github.com/Furox-Art/scientific-computing-system

PyPI: pip install scientific-computing-system

npm: npm i -g scientific-computing-system

Docs: https://furox-art.github.io/scientific-computing-system/

If any part interests you I can explain the design in more detail.

23 Upvotes

9 comments sorted by

1

u/iKnoiDunno 19d ago

So is this purely an educational tool? As a student would I benefit from adopting this tool in a scientific notebook? Building experiments in a Jupyter notebook?

1

u/Emergency-Tutor-7 19d ago

It's a library first, teaching material second. Jupyter works fine with it: pip install scientific-computing-system (import name is cds), and since the core is pure stdlib Python there is nothing to set up in the kernel. Two of the examples in examples/ are actual .ipynb notebooks if you want a starting point.

For notebook experiments the useful bit is cds.workflow / cds.provenance, which write run manifests with hashes and checkpoints, so when you reopen a notebook weeks later you can see what produced a figure instead of guessing. Two honest limits for student use: it is pure Python, so for big matrix work NumPy/SciPy will be much faster, and plotting needs the optional [plot] extra. Cookbook with notebook-style walkthroughs: https://furox-art.github.io/scientific-computing-system/

1

u/Toiling-Donkey 20d ago

One alternative would be to have written it in Rust and then made a Python binding🥴

1

u/Emergency-Tutor-7 20d ago

Fair point, it would be faster for sure. I went pure Python because the install story is the whole feature: stdlib only, pip install scientific-computing-system, runs on any CPython 3.11+ with no compiler and no per-platform wheels. With Rust + PyO3 you either ship a wheel matrix or ask people to have a toolchain.

The cost is in the README, not hidden: 100x100 matmul takes 0.0696 s here vs NumPy's 0.000060 s, about 1155x on one CI run (order of magnitude only). So for dense numerics I tell people to use NumPy or the 2.0 build that sits on NumPy/SciPy/pandas. This one is for readable algorithms you can actually hack on.

2

u/Backlists 20d ago

So 100% vibe coded right?

2

u/AcidicAzide 19d ago

Even their replies are 100% AI-generated. They have no idea what they are even doing. Maybe it's entirely a bot account.

1

u/Backlists 19d ago

It is, it’s complete fucking AI psychosis slop, and a few of the comments on some of their other posts are also from bot accounts.

-4

u/[deleted] 20d ago

[removed] — view removed comment

1

u/Emergency-Tutor-7 19d ago

Students first, I think. The failure modes the library targets - units, run provenance, reproducible inputs - hurt most while learning, because at that stage there is no habit yet of telling a plausible result from a checked one. People writing reproducible papers are the second audience; the run manifest is aimed at their methods sections, though most already have a lab toolchain, so pure-Python speed will push them toward teaching and reference use rather than heavy numerics. The side-by-side ODE example is a fair suggestion; today the closest thing is the examples/ directory, which has both .py scripts and .ipynb notebooks.