NumPy vs SciPy: source lines of code compared

This page compares the source lines of code (SLOC) of numpy/numpy and scipy/scipy using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.

As of 2026-08-26, numpy/numpy contains 585,723 total lines (429,404 code) across 958 files, while scipy/scipy contains 675,916 total lines (521,046 code) across 1,317 files as of 2026-08-26. scipy/scipy is about 1.2x the size of numpy/numpy by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

Metricnumpy/numpyscipy/scipy
Files9581,317
Total lines585,723675,916
Code lines429,404521,046
Comment lines103,68288,243
Blank lines52,63766,627
Languages counted1212

Top languages in numpy/numpy: Python (43.3% of code), C (39.2% of code), C Header (7.6% of code). Top languages in scipy/scipy: Python (57.3% of code), C (21.0% of code), C++ (6.5% of code). Python, C, C Header, C++, Cython appear in both top language lists.

Methodology: both counts come from cached OctoCounts reports generated with tokei. numpy/numpy was counted at ref main (commit 4f94a9ac1281) on 2026-08-26; scipy/scipy was counted at ref main (commit cacd2b498be8) on 2026-08-26. See the counting methodology for ignored directories and analysis options.

Evidence and next steps:

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

Compare FAQ

Which has more lines of code, numpy/numpy or scipy/scipy?

scipy/scipy has more code: 521,046 code lines versus 429,404 for numpy/numpy, about 1.2x as much, based on cached OctoCounts reports as of 2026-08-26.

Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for numpy/numpy, scipy/scipy, or any repository.

How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. numpy/numpy was counted at ref main (commit 4f94a9ac1281) on 2026-08-26; scipy/scipy was counted at ref main (commit cacd2b498be8) on 2026-08-26. See the counting methodology for ignored directories and analysis options.

Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.