FrankenNumPy

Docs/Context

Reading the Source Code

If you want to understand how FrankenNumPy works at the source level, here are the natural entry points:

To understand... Start at
Shape and stride arithmetic crates/fnp-ndarray/src/lib.rs (2,079 lines). Small enough to read in one sitting.
Dtype promotion rules crates/fnp-dtype/src/lib.rs around pub const fn promote(...). The whole 324-entry table is in one match expression.
The transfer-loop selector crates/fnp-iter/src/lib.rs around TransferClass, TransferSelectorInput, and Nditer.
A representative ufunc crates/fnp-ufunc/src/lib.rs: elementwise_binary (around line 6466) for the broadcast skeleton, reduce_sum_values (around line 32602) for the compensated-summation logic.
Eigenvalue and SVD algorithms crates/fnp-linalg/src/lib.rs: svd_mxn, eig_nxn, qr_mxn are stand-alone implementations of the Householder / Golub–Kahan / Francis machinery.
RNG bit generators crates/fnp-random/src/lib.rs: search for Pcg64DxsmRng, Mt19937Rng, PhiloxRng, Sfc64Rng, each in its own struct. The Generator API is in the second half of the file.
NPY/NPZ binary format crates/fnp-io/src/lib.rs: pub fn save and pub fn load are entry points; the header parser and writer sit next to them.
The runtime decision engine crates/fnp-runtime/src/lib.rs is one of the smallest crates (1,760 lines); reading it end-to-end is a complete tour of the strict/hardened mode split and the evidence ledger.
How parity is verified crates/fnp-conformance/src/lib.rs plus the 48 binaries under crates/fnp-conformance/src/bin/. Start with capture_numpy_oracle.rs and run_ufunc_differential.rs.
The PyO3 surface crates/fnp-python/src/lib.rs: a ~202k-line file (plus the small searchsorted_array_needle.rs module) because PyO3 wants all #[pymodule] bindings co-located. The structural lock-in test is at crates/fnp-python/tests/conformance_remaining_top_level_attrs.rs::fnp_python_covers_full_numpy_all.

The largest engine crate (fnp-ufunc, 84,974 lines) keeps almost all of it in src/lib.rs (84,640 lines; the small-sort kernels are in src/sort_small.rs) because the ufunc dispatch table is centralized; splitting it would scatter the dispatcher and obscure the structure.

Finding a function fast. With 1,805 pub fn declarations across the workspace's library code (crates/*/src/**/*.rs, excluding src/bin/; 2026-10-08 count), ripgrep is the navigation tool of choice:

# Find a pub fn by name (across all crates):
rg -n 'pub fn <name>' crates/

# Find the impl block on UFuncArray that defines a method:
rg -nB1 -A1 'impl UFuncArray' crates/fnp-ufunc/

# Find every test exercising a name:
rg -n 'fn .*<name>' crates/*/tests/ crates/*/src/lib.rs

This section in the README on GitHub