Docs/Context
Inspirations and Prior Art
FrankenNumPy stands on the shoulders of some specific design lineages worth acknowledging.
| Project | What we learned from it |
|---|---|
| NumPy itself | The behavioral specification we're targeting, and the source of every algorithm correspondence in the Algorithm References section. NumPy is also the oracle in every differential-conformance run: there is no FrankenNumPy without a real NumPy on the build host. |
| NEP 19 — RNG Policy (Robert Kern, 2018) | The stream-stability policy that made it acceptable to introduce new bit generators (PCG64, PCG64DXSM, Philox, SFC64) alongside MT19937 without surprising existing users. The SeedSequence API NumPy ships alongside the NEP is itself derived from Melissa O'Neill's C++11 std::seed_seq (per the copyright header on numpy/random/bit_generator.pyx); we re-implement that design directly from the upstream source: hierarchical spawn(n), entropy-pool mixing, schema-versioned state payload. |
| NEP 1 — A Simple File Format for NumPy Arrays (Robert Kern) | The .npy binary format. Bit-exact round-trip is our promise; the spec is the contract. NPY 2.0 extends NPY 1.0 to support headers larger than 65,535 bytes. |
| CPython | The Python runtime that fnp_python is loaded into via PyO3, and the source of the exception base classes (ValueError, TypeError, OSError, ...) that numpy.exceptions (and the same classes under fnp_python.exceptions) ultimately inherit from. The numpy-specific assertion helpers in numpy.testing and the numpy-specific exception classes (AxisError, ComplexWarning, ...) come from numpy itself, not from CPython. |
| ndarray (bluss et al.) | The "what does idiomatic Rust N-D arrays look like?" reference. ndarray made different design choices (statically-known dimensionality via Ix, BLAS via ndarray-linalg, generic over element types). We departed from them to target NumPy semantics. |
| nalgebra (Sébastien Crozet et al.) | The reference for "what fully-typed, statically-sized linear algebra looks like in Rust." Our 2×2 fast paths borrow the spirit but not the typing; we keep dynamic shapes throughout because NumPy's contract is dynamic. |
| RaptorQ (RFC 6330) | The fountain code behind the conformance and benchmark artifact sidecars. The IETF spec is the contract; the asupersync implementation is the engine. |
| asupersync | The optional structured-async runtime used in fnp-runtime's observability pipelines and in fnp-conformance's RaptorQ primitives. Not a runtime dependency of the numerical core. |
| frankentui | The optional terminal-native dashboards exposed via fnp-runtime's frankentui feature. Same project family as FrankenNumPy; same "rewrite an established interface in safe Rust with explicit contracts" pattern. |
beads_rust (br) |
The dependency-aware issue tracker that drives the multi-agent workflow described in Multi-Agent Development Process. Every closed bead is a contract we've fulfilled. |
The "clean-room reimplementation of an established interface in safe Rust" pattern itself is widely used; FrankenNumPy is one of a family. See also Frankensearch (the Tantivy-on-steroids hybrid search engine), Frankentui (the terminal UI library), and the broader "Frankenstack" of memory-safe replacements for legacy infrastructure.