Hotspots
Files that are both large and changed often are where bugs tend to cluster and where refactoring pays off first. Each file of code in the current tree, tests included, is placed by its size and by the number of commits that changed it, under this name or one it had before; its hotspot score is changes × √lines. Documentation, vendored and generated files, and files without counted lines, such as binary files, are left out.
- Files Analyzed
- 1,515
- of 2,466 in the current tree
- Top 10 Files
- 30.3%
- of the total hotspot score
- Median File Size
- 88 lines
- half of the files are at least this large
- Median Changes
- 11 commits
- half of the files changed at least this often
Change frequency by file size
Each dot is a file; a bigger dot is a higher score. The dashed lines mark the median file size and the median number of changes: the large files that change often, in the top right, are in color. The 5 highest scores are numbered as in the list. Both axes are logarithmic.
Chart not shown: it is drawn with JavaScript, which is turned off or blocked on this page, as it is on Jenkins by default. How to show the charts
Highest scores
- 1numpy/_core/tests/test_multiarray.py12,456 lines · 1,047 changes
- 2numpy/__init__.pyi16,301 lines · 758 changes
- 3numpy/_core/src/multiarray/multiarraymodule.c5,852 lines · 1,130 changes
- 4numpy/_core/src/umath/ufunc_object.c7,590 lines · 905 changes
- 5numpy/ma/core.py9,263 lines · 696 changes
- 6numpy/lib/_function_base_impl.py5,844 lines · 762 changes
- 7numpy/_core/_add_newdocs.py7,242 lines · 657 changes
- 8numpy/_core/src/multiarray/scalartypes.c.src5,097 lines · 605 changes
Top hotspots
The files ranked by hotspot score: the larger a file is and the more often it changes, the higher it ranks. Authors is how many people have changed the file, bots aside, as on the Code Ownership page: a hotspot only one person has changed is also a bus-factor risk.
| File | Lines | Changes | Authors | Score | Bar |
|---|---|---|---|---|---|
| numpy/_core/tests/test_multiarray.py | 12,456 | 1,047 | 187 | 116,852.0 | |
| numpy/__init__.pyi | 16,301 | 758 | 56 | 96,777.9 | |
| numpy/_core/src/multiarray/multiarraymodule.c | 5,852 | 1,130 | 114 | 86,443.2 | |
| numpy/_core/src/umath/ufunc_object.c | 7,590 | 905 | 70 | 78,844.1 | |
| numpy/ma/core.py | 9,263 | 696 | 138 | 66,986.2 | |
| numpy/lib/_function_base_impl.py | 5,844 | 762 | 225 | 58,251.9 | |
| numpy/_core/_add_newdocs.py | 7,242 | 657 | 171 | 55,910.7 | |
| numpy/_core/src/multiarray/scalartypes.c.src | 5,097 | 605 | 68 | 43,192.9 | |
| numpy/_core/src/multiarray/arraytypes.c.src | 5,106 | 551 | 69 | 39,372.4 | |
| numpy/_core/tests/test_umath.py | 5,563 | 514 | 98 | 38,337.0 |
Table: the 100 highest-scoring of 1,515 files
| File | Lines | Changes | Authors | Score | Bar |
|---|---|---|---|---|---|
| numpy/_core/tests/test_multiarray.py | 12,456 | 1,047 | 187 | 116,852.0 | |
| numpy/__init__.pyi | 16,301 | 758 | 56 | 96,777.9 | |
| numpy/_core/src/multiarray/multiarraymodule.c | 5,852 | 1,130 | 114 | 86,443.2 | |
| numpy/_core/src/umath/ufunc_object.c | 7,590 | 905 | 70 | 78,844.1 | |
| numpy/ma/core.py | 9,263 | 696 | 138 | 66,986.2 | |
| numpy/lib/_function_base_impl.py | 5,844 | 762 | 225 | 58,251.9 | |
| numpy/_core/_add_newdocs.py | 7,242 | 657 | 171 | 55,910.7 | |
| numpy/_core/src/multiarray/scalartypes.c.src | 5,097 | 605 | 68 | 43,192.9 | |
| numpy/_core/src/multiarray/arraytypes.c.src | 5,106 | 551 | 69 | 39,372.4 | |
| numpy/_core/tests/test_umath.py | 5,563 | 514 | 98 | 38,337.0 | |
| numpy/_core/src/multiarray/ctors.c | 4,204 | 558 | 85 | 36,179.7 | |
| numpy/ma/tests/test_core.py | 6,393 | 445 | 91 | 35,580.5 | |
| numpy/_core/src/multiarray/arrayobject.c | 1,405 | 899 | 49 | 33,697.5 | |
| numpy/_core/fromnumeric.py | 4,521 | 496 | 169 | 33,350.2 | |
| numpy/lib/tests/test_function_base.py | 5,214 | 437 | 136 | 31,554.9 | |
| numpy/_core/numeric.py | 2,737 | 593 | 154 | 31,023.6 | |
| numpy/_core/src/multiarray/methods.c | 3,189 | 543 | 75 | 30,663.9 | |
| numpy/_core/tests/test_regression.py | 2,696 | 557 | 82 | 28,921.1 | |
| numpy/_core/tests/test_numeric.py | 4,350 | 421 | 107 | 27,766.9 | |
| numpy/_core/src/multiarray/descriptor.c | 4,063 | 371 | 56 | 23,648.2 | |
| numpy/_core/tests/test_ufunc.py | 3,622 | 354 | 62 | 21,304.8 | |
| numpy/random/_generator.pyx | 5,086 | 296 | 73 | 21,109.6 | |
| numpy/_core/src/multiarray/mapping.c | 3,482 | 336 | 46 | 19,826.8 | |
| numpy/_core/src/multiarray/item_selection.c | 3,544 | 312 | 54 | 18,573.8 | |
| numpy/_core/src/multiarray/convert_datatype.c | 3,742 | 273 | 39 | 16,699.9 | |
| numpy/_core/code_generators/ufunc_docstrings.py | 5,634 | 217 | 88 | 16,288.0 | |
| numpy/lib/tests/test_io.py | 2,769 | 302 | 87 | 15,891.6 | |
| numpy/_core/src/umath/loops.c.src | 2,716 | 287 | 46 | 14,957.1 | |
| numpy/_core/tests/test_nditer.py | 3,956 | 237 | 38 | 14,906.5 | |
| numpy/f2py/crackfortran.py | 3,810 | 219 | 51 | 13,517.8 | |
| numpy/_core/src/multiarray/datetime.c | 4,529 | 197 | 38 | 13,257.7 | |
| numpy/_core/tests/test_datetime.py | 3,470 | 221 | 55 | 13,018.4 | |
| numpy/_core/include/numpy/ndarraytypes.h | 2,085 | 283 | 56 | 12,922.3 | |
| numpy/testing/_private/utils.py | 3,119 | 231 | 75 | 12,900.9 | |
| numpy/_core/code_generators/generate_umath.py | 1,717 | 306 | 62 | 12,679.6 | |
| numpy/_core/tests/test_dtype.py | 2,643 | 246 | 72 | 12,646.9 | |
| numpy/ma/core.pyi | 5,006 | 176 | 21 | 12,452.5 | |
| numpy/_core/arrayprint.py | 1,785 | 289 | 69 | 12,210.0 | |
| numpy/_core/umath.pyi | 24,355 | 73 | 2 | 11,392.4 | |
| numpy/random/mtrand.pyx | 4,986 | 159 | 52 | 11,227.2 | |
| numpy/ma/extras.py | 2,459 | 217 | 80 | 10,760.7 | |
| numpy/linalg/tests/test_linalg.py | 2,558 | 212 | 67 | 10,722.3 | |
| numpy/_core/fromnumeric.pyi | 6,363 | 133 | 15 | 10,609.2 | |
| numpy/_core/multiarray.pyi | 4,508 | 150 | 16 | 10,071.2 | |
| numpy/_core/src/umath/scalarmath.c.src | 2,030 | 221 | 38 | 9,957.3 | |
| numpy/_core/src/multiarray/compiled_base.c | 2,057 | 213 | 52 | 9,660.4 | |
| numpy/linalg/umath_linalg.cpp | 4,844 | 136 | 34 | 9,465.4 | |
| numpy/__init__.py | 928 | 308 | 54 | 9,382.6 | |
| numpy/_core/src/multiarray/dtype_transfer.c | 3,866 | 144 | 25 | 8,953.5 | |
| numpy/_core/defchararray.py | 1,426 | 230 | 57 | 8,685.4 | |
| numpy/_core/tests/test_deprecations.py | 716 | 312 | 65 | 8,348.6 | |
| numpy/_core/src/multiarray/nditer_constr.c | 3,594 | 137 | 20 | 8,213.1 | |
| numpy/_core/tests/test_stringdtype.py | 3,998 | 128 | 16 | 8,093.4 | |
| numpy/_core/src/multiarray/nditer_pywrap.c | 2,539 | 159 | 23 | 8,011.8 | |
| numpy/testing/tests/test_utils.py | 2,179 | 170 | 57 | 7,935.6 | |
| numpy/_core/records.py | 1,105 | 235 | 60 | 7,811.8 | |
| numpy/_core/src/multiarray/_multiarray_tests.c.src | 2,585 | 149 | 40 | 7,575.6 | |
| numpy/_core/meson.build | 1,572 | 180 | 41 | 7,136.7 | |
| numpy/_core/tests/test_scalarmath.py | 1,243 | 202 | 55 | 7,121.8 | |
| numpy/_core/src/umath/ufunc_type_resolution.c | 2,367 | 141 | 38 | 6,859.9 | |
| numpy/_core/src/multiarray/iterators.c | 1,810 | 158 | 34 | 6,722.0 | |
| numpy/random/tests/test_generator_mt19937.py | 2,829 | 121 | 28 | 6,435.8 | |
| numpy/lib/_arraysetops_impl.py | 1,241 | 178 | 67 | 6,270.6 | |
| numpy/ma/tests/test_extras.py | 2,159 | 130 | 53 | 6,040.5 | |
| numpy/polynomial/chebyshev.py | 2,059 | 132 | 48 | 5,989.7 | |
| numpy/_core/_internal.py | 970 | 190 | 42 | 5,917.5 | |
| numpy/_core/tests/test_indexing.py | 1,728 | 141 | 40 | 5,861.3 | |
| numpy/matrixlib/defmatrix.py | 1,117 | 175 | 44 | 5,848.8 | |
| numpy/lib/_function_base_impl.pyi | 3,790 | 95 | 19 | 5,848.5 | |
| numpy/_core/src/multiarray/conversion_utils.c | 1,428 | 153 | 39 | 5,781.7 | |
| numpy/random/tests/test_random.py | 1,744 | 138 | 47 | 5,763.0 | |
| numpy/_core/multiarray.py | 1,738 | 135 | 55 | 5,628.1 | |
| numpy/_core/tests/test_arrayprint.py | 1,363 | 147 | 43 | 5,427.1 | |
| numpy/lib/_nanfunctions_impl.py | 2,007 | 121 | 53 | 5,420.7 | |
| numpy/f2py/cfuncs.py | 1,597 | 135 | 32 | 5,394.9 | |
| numpy/polynomial/polynomial.py | 1,689 | 130 | 48 | 5,342.7 | |
| numpy/fft/_pocketfft.py | 1,660 | 129 | 52 | 5,255.9 | |
| numpy/lib/_polynomial_impl.py | 1,479 | 133 | 54 | 5,114.9 | |
| numpy/_core/numerictypes.py | 544 | 218 | 40 | 5,084.6 | |
| numpy/f2py/rules.py | 1,680 | 124 | 33 | 5,082.5 | |
| numpy/typing/tests/data/reveal/ufuncs.pyi | 5,398 | 69 | 7 | 5,069.5 | |
| numpy/_core/src/multiarray/lowlevel_strided_loops.c.src | 2,236 | 107 | 28 | 5,059.6 | |
| numpy/lib/_shape_base_impl.py | 1,250 | 143 | 60 | 5,055.8 | |
| numpy/_core/src/multiarray/dtypemeta.c | 1,603 | 125 | 23 | 5,004.7 | |
| numpy/polynomial/hermite.py | 1,800 | 116 | 44 | 4,921.5 | |
| numpy/_core/src/multiarray/common.c | 748 | 178 | 38 | 4,868.2 | |
| numpy/lib/_index_tricks_impl.py | 1,048 | 150 | 60 | 4,855.9 | |
| numpy/linalg/_linalg.py | 3,643 | 80 | 36 | 4,828.6 | |
| numpy/polynomial/laguerre.py | 1,735 | 115 | 42 | 4,790.1 | |
| numpy/polynomial/hermite_e.py | 1,698 | 116 | 43 | 4,780.0 | |
| numpy/polynomial/legendre.py | 1,661 | 117 | 44 | 4,768.4 | |
| numpy/_core/src/multiarray/shape.c | 1,063 | 145 | 28 | 4,727.5 | |
| tools/swig/numpy.i | 2,971 | 85 | 29 | 4,633.1 | |
| numpy/lib/_twodim_base_impl.py | 1,237 | 127 | 61 | 4,466.7 | |
| numpy/_core/src/multiarray/array_coercion.c | 1,468 | 116 | 17 | 4,444.5 | |
| numpy/lib/recfunctions.py | 1,681 | 108 | 39 | 4,428.0 | |
| numpy/_core/src/multiarray/getset.c | 834 | 151 | 35 | 4,360.7 | |
| numpy/_core/src/multiarray/nditer_api.c | 2,340 | 89 | 18 | 4,305.2 | |
| numpy/_core/shape_base.py | 994 | 136 | 47 | 4,287.8 | |
| numpy/lib/tests/test_arraysetops.py | 1,310 | 117 | 48 | 4,234.7 |
How NumPy compares with other Python open source projects →
How NumPy ranks among Python open source projects by AI-assisted commits →
Generate this report for your own repository with gitstats-action · All Gallery reports
The smallest workflow
Publishes the report to GitHub Pages on every push to main: turn on Pages for the gh-pages branch.
# .github/workflows/gitstats.yml
name: GitStats Report
on:
push:
branches: [main]
permissions:
contents: write
jobs:
gitstats:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: shenxianpeng/gitstats-action@v1
with:
deploy-to-pages: true