Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
243 commits
Select commit Hold shift + click to select a range
ecd7023
fix(layout)!: every fresh ufunc result takes NumPy 2.4.2's layout - t…
Nucs Nov 5, 2026
41d37de
ci(release): publish-nuget runs in the gated `nuget` environment - ev…
Nucs Nov 8, 2026
18314ca
fix(layout)!: the ufunc result-layout port (branch qa/ufunc-keeporder…
Nucs Nov 8, 2026
ce1824f
Merge branch 'qa/ufunc-keeporder' into strings: recorded only (strate…
Nucs Nov 8, 2026
90ae655
test(openbugs): the Bitmap pins reproduce GitHub #396 / #440 / #475 /…
Nucs Nov 8, 2026
e25b752
test(issues): every answer posted in the 0.80.0 issue triage is a uni…
Nucs Nov 8, 2026
103574b
test(parity-qa): second NumPy parity QA journey, first hour - six fin…
Nucs Nov 8, 2026
2c3fd8a
perf(onnxruntime): the synchronous Run tier's own input/output handle…
Nucs Nov 8, 2026
a98e9ce
test(parity-qa): QB-07 pinned - a binary or comparison result over a …
Nucs Nov 8, 2026
8d9f736
test(openbugs): a memory map of a Fortran-ordered .npy is never relea…
Nucs Nov 8, 2026
51e574a
test(parity-qa): QB-08 and QB-09 pinned - zero-size results the alloc…
Nucs Nov 8, 2026
882a66a
test(parity-qa): QB-10 ... QB-14 pinned - the NaN a computation retur…
Nucs Nov 8, 2026
64304f3
test(parity-qa): QB-15..QB-18 - the median family at its overflow edg…
Nucs Nov 8, 2026
8c8ad48
fix(coverage): the layout oracle's ufunc family joins its rows - sinc…
Nucs Nov 8, 2026
a582486
docs(api-parity): third pass of the np.* signature gap map on journey…
Nucs Nov 8, 2026
6f09f65
test(parity-qa): QB-19..QB-21 - fancy and boolean-mask assignment aga…
Nucs Nov 8, 2026
eb8e2d7
test(parity-qa): QB-22..QB-25 - np.FlatIterator against NumPy's flati…
Nucs Nov 8, 2026
d255dcf
perf(partition): a single kth near either end of a long contiguous li…
Nucs Nov 8, 2026
db83565
docs(specialized-path): catalog the edge selection of d255dcfa - np.(…
Nucs Nov 8, 2026
18c741c
test(parity-qa): QB-04 widened - ndarray.item(i, j, k) with the wrong…
Nucs Nov 8, 2026
08e379e
test(parity-qa): QB-26 - np.isreal of a non-C real array and np.polyv…
Nucs Nov 8, 2026
6f35e35
test(parity-qa): QB-27 - np.array(a, copy=False) and squeeze() withou…
Nucs Nov 8, 2026
6b78446
test(parity-qa): QB-28 - a C# multi-dimensional integer array is refu…
Nucs Nov 8, 2026
26ea24c
docs(parity-qa): journal row - NumPy's insert / delete / broadcast / …
Nucs Nov 8, 2026
de0f4ff
docs(parity-qa): journal row - histogram2d / nanmedian / fft / polyno…
Nucs Nov 9, 2026
d1829bb
docs(parity-qa): QB-02 widened - a C# ulong argument binds np.arange'…
Nucs Nov 9, 2026
594d7ad
test(parity-qa): the QB-02 pin also asserts np.arange's ulong case (N…
Nucs Nov 9, 2026
9986673
test(parity-qa): QB-29 - C# integer literals bind the float overloads…
Nucs Nov 9, 2026
bb3e1ac
test(parity-qa): QB-30 - the (NDArray, object) overloads of np.power …
Nucs Nov 9, 2026
9a0ee0f
docs(parity-qa): journal row - float16 through 151 functions (604 pro…
Nucs Nov 9, 2026
a7e6db9
test(parity-qa): QB-18 widened - float16 cbrt / arcsinh / arccosh / a…
Nucs Nov 9, 2026
265be7e
docs(parity-qa): journal row - complex non-ufunc paths, 33/40/64-dim …
Nucs Nov 9, 2026
67cb8e8
docs(parity-qa): progress-row timestamp corrected to the session clock
Nucs Nov 9, 2026
efcb6ca
test(openbugs): the ONNX Runtime bridge refuses the CPU device's own …
Nucs Nov 9, 2026
b214b58
test(parity-qa): QB-31 - foreach over an empty array whose first axis…
Nucs Nov 9, 2026
d45b9c7
docs(parity-qa): journal row - random index-expression and einsum fuz…
Nucs Nov 9, 2026
f611a22
docs(parity-qa): timestamp corrected
Nucs Nov 9, 2026
ef63f8c
test(parity-qa): QB-32 - a Python list spelled object[] is refused by…
Nucs Nov 9, 2026
92d10d7
test(parity-qa): QB-33 - np.nan is .NET's double.NaN (0xfff8..., sign…
Nucs Nov 9, 2026
81568a6
test(parity-qa): QB-34 / QB-35 - ndarray.base is a new NDArray on eve…
Nucs Nov 9, 2026
1f13553
test(parity-qa): QB-36 - strides of length-1 axes differ from NumPy's…
Nucs Nov 9, 2026
0b51be1
docs(parity-qa): QB-32 widened - a list as an assigned value, a put v…
Nucs Nov 9, 2026
9f6ff67
docs(parity-qa): timestamps corrected
Nucs Nov 9, 2026
b240a9b
test(parity-qa): QB-37 - the bitwise ufuncs reject the inputs' own pr…
Nucs Nov 9, 2026
bfe170d
test(parity-qa): QB-38 - float32 printing decides exponential notatio…
Nucs Nov 9, 2026
2fc3b65
test(parity-qa): QB-39..41 - the printer's rstrip trims spaces only (…
Nucs Nov 9, 2026
b5023d1
test(parity-qa): QB-42 - bool arrays holding bytes other than 0/1 (a …
Nucs Nov 9, 2026
3194ce4
docs(parity-qa): exotic storage round 2 and 0-d indices are clean - r…
Nucs Nov 9, 2026
9641366
perf(cast): Converts.ToInt32(double) decides NaN / inf / out-of-range…
Nucs Nov 9, 2026
05fa58f
test(parity-qa): QB-43 - a partition at several kth (every median / q…
Nucs Nov 9, 2026
8588a65
docs(parity-qa): integer wrap inside composites, a random view-pipeli…
Nucs Nov 9, 2026
e44cb33
docs(parity-qa): a random sort / search fuzzer and NumPy's own test_n…
Nucs Nov 9, 2026
3378417
test(parity-qa): QB-44 - a C# long / ulong needle binds np.searchsort…
Nucs Nov 9, 2026
7fc3444
test(parity-qa): cross-check against every existing pin - QB-31, QB-3…
Nucs Nov 9, 2026
8dcdd48
test(parity-qa): QB-45 / QB-46 - einsum result layouts: the default K…
Nucs Nov 9, 2026
d7b673e
test(parity-qa): QB-47 - a 0-d masked array prints its element in the…
Nucs Nov 9, 2026
9a04da2
docs(parity-qa): text-array printing and the layouts of view-returnin…
Nucs Nov 9, 2026
7731743
test(parity-qa): QB-48 - np.empty_like(a, null, 'F') (NumPy's positio…
Nucs Nov 9, 2026
c3a5fbc
test(parity-qa): QB-49 - np.ma.make_mask / np.ma.mask_or: NumPy's pos…
Nucs Nov 9, 2026
2815dc9
docs(parity-qa): np.arange with dtype= is clean (32 probes); the slot…
Nucs Nov 9, 2026
e626202
docs(parity-qa): packbits / unpackbits and tofile / fromfile are clea…
Nucs Nov 9, 2026
de5929e
docs(parity-qa): np.r_ / np.c_ directives are clean (direction 22); t…
Nucs Nov 9, 2026
8ad9760
test(parity-qa): QB-50 - complex np.cumprod over an axis of length 2:…
Nucs Nov 9, 2026
e017f17
test(parity-qa): QB-51 - complex np.multiply over a single-element Np…
Nucs Nov 9, 2026
ba45690
docs(parity-qa): the rules' Open items checked for pins and finfo / i…
Nucs Nov 9, 2026
60b69bb
docs(parity-qa): QB-51's reach and the printing cutoffs are otherwise…
Nucs Nov 9, 2026
ef5feee
docs(parity-qa): around with negative decimals, F-order-following pro…
Nucs Nov 9, 2026
146f6a3
test(parity-qa): QB-52 - the default argsort's tie order shows in np.…
Nucs Nov 9, 2026
8e1d78b
test(parity-qa): QB-53 - mixed-dtype integer GEMM-shaped products acc…
Nucs Nov 9, 2026
8042a5d
docs(parity-qa): rows 04:41 and 04:45 - int64 exactness past 2**53 (5…
Nucs Nov 9, 2026
91ded39
test(parity-qa): QB-54 - np.nanmedian of empty data with a repeated a…
Nucs Nov 9, 2026
14f2ba9
test(parity-qa): QB-55 np.broadcast_to's NDArray-against extension ca…
Nucs Nov 9, 2026
e477544
test(parity-qa): QB-57 np.kron keeps a C# literal operand weak; QB-58…
Nucs Nov 9, 2026
b2386f7
test(parity-qa): QB-59 - np.put(a, <scalar index>, v) is ambiguous be…
Nucs Nov 9, 2026
0c9ebf1
test(parity-qa): QB-60 - an explicit axis=None (axis: null) is CS0121…
Nucs Nov 9, 2026
7091541
test(parity-qa): QB-61 - a single ndarray passed to vstack / hstack /…
Nucs Nov 9, 2026
282322e
docs(parity-qa): QB-60 marked DOCUMENTED (API_DIFF_GAP.md AD9b); oper…
Nucs Nov 9, 2026
0f237ed
docs(parity-qa): row 05:22 - indexer spellings, the astype casting-ru…
Nucs Nov 9, 2026
9e2b497
docs(parity-qa): row 05:25 - Python-int bounds, tuple-of-arrays joins…
Nucs Nov 9, 2026
2ed5dd5
docs(parity-qa): row 05:27 - size-0 shortcuts of the nan quantile fam…
Nucs Nov 9, 2026
d1a595d
test(parity-qa): QB-61 widened to numpy.ma's stackers (a single maske…
Nucs Nov 9, 2026
fefea40
docs(parity-qa): row 05:30 - float32 / float16 / int8 compositions wi…
Nucs Nov 9, 2026
d8deb1d
docs(parity-qa): row 05:34 - the ambiguity fuzzer's named-None pass (…
Nucs Nov 9, 2026
b4ceb4f
docs(parity-qa): row 05:36 - random histogram2d / histogramdd and out…
Nucs Nov 9, 2026
70dcf15
docs(parity-qa): the journey's Summary - 61 numbered findings, 57 new…
Nucs Nov 9, 2026
1997d53
docs(parity-qa): Summary wording - the NumPy artifacts not followed a…
Nucs Nov 9, 2026
a5c7160
docs(parity-qa): row 05:39 - direction 46, NEP 50 over np.linalg's an…
Nucs Nov 9, 2026
de9d883
docs(parity-qa): row 05:43 - direction 45, the ambiguity fuzzer at C#…
Nucs Nov 9, 2026
75ecdd5
docs(parity-qa): row 05:44 - out= on non-ufunc functions (clean)
Nucs Nov 9, 2026
68817f9
docs(parity-qa): row 05:45 - where= on reductions (clean) and the fin…
Nucs Nov 9, 2026
704d4fd
docs(parity-qa): row 05:48 - QB-29 / QB-44's literal-capture mechanis…
Nucs Nov 9, 2026
13197a9
test(parity-qa): QB-61 widened to np.linalg.multi_dot - a stack of ma…
Nucs Nov 9, 2026
e794891
docs(parity-qa): the Summary's QB-61 line names np.linalg.multi_dot
Nucs Nov 9, 2026
561046e
docs(parity-qa): row 05:53 - numpy.ma with the binding angles, random…
Nucs Nov 9, 2026
bda3a13
docs(parity-qa): row 05:55 - QB-48's char-capture mechanism across ev…
Nucs Nov 9, 2026
4b1524a
docs(parity-qa): row 05:54's time read from the clock (was written as…
Nucs Nov 9, 2026
a3ecf93
docs(parity-qa): row 05:56 - random np.lexsort (clean)
Nucs Nov 9, 2026
65b90d1
docs(parity-qa): the lexsort row's time read from the clock (05:55, w…
Nucs Nov 9, 2026
7261711
docs(parity-qa): row 05:57 - random np.isin (clean)
Nucs Nov 9, 2026
3440468
docs(parity-qa): the isin row's time read from the clock (05:56, was …
Nucs Nov 9, 2026
ca5bbd3
docs(parity-qa): row 05:58 - binning edge cases (clean)
Nucs Nov 9, 2026
f6228a9
docs(parity-qa): the binning row's time read from the clock (05:57, w…
Nucs Nov 9, 2026
5fc3ab4
docs(parity-qa): row 05:58 - the shift counts NumPy 2 defines (clean)
Nucs Nov 9, 2026
5f02ee5
docs(parity-qa): row 05:59 - diff / gradient / ediff1d / scans at the…
Nucs Nov 9, 2026
9c6919e
docs(parity-qa): row 05:59 - QB-58's reach into numpy.ma's set routin…
Nucs Nov 9, 2026
c33c0b1
test(parity-qa): QB-52 widened - np.unique(return_inverse=True)'s sur…
Nucs Nov 9, 2026
54d05a0
docs(parity-qa): row 06:03 - QB-52's root through the other default-k…
Nucs Nov 9, 2026
5fef3f7
docs(parity-qa): row 06:04 - the histogram family's result dtypes (cl…
Nucs Nov 9, 2026
ec1dee1
docs(parity-qa): row 06:05 - np.arange at its extremes (clean)
Nucs Nov 9, 2026
86d76cd
docs(parity-qa): row 06:06 - every QB pin verified failing on net10.0…
Nucs Nov 9, 2026
b2020b5
docs(parity-qa): QB-61 widened to C# array literals - np.vstack(new d…
Nucs Nov 9, 2026
a11eaeb
docs(parity-qa): the Summary's QB-61 line names the C# array-literal …
Nucs Nov 9, 2026
25f5b1f
docs(parity-qa): row 06:07 - np.vectorize (clean; its size-0 behavior…
Nucs Nov 9, 2026
3cc1362
docs(parity-qa): row 06:08 - the split family's count / index spellin…
Nucs Nov 9, 2026
44b3e7e
docs(parity-qa): row 06:09 - QB-61's literal angle on the other seque…
Nucs Nov 9, 2026
14886e0
docs(parity-qa): row 06:10 - the cyclic value rules of putmask / plac…
Nucs Nov 9, 2026
70dcab9
docs(parity-qa): row 06:10 - choose / select / where past the common …
Nucs Nov 9, 2026
ae22688
docs(parity-qa): row 06:11 - QB-54's empty-data ordering through the …
Nucs Nov 9, 2026
278ac90
docs(parity-qa): row 06:12 - QB-53 reaches a.dot(b) and numpy.matrix's *
Nucs Nov 9, 2026
c586660
docs(parity-qa): row 06:12 - np.linalg's Array-API forms (clean)
Nucs Nov 9, 2026
0c72596
docs(parity-qa): row 06:13 - np.tensordot's axes forms and rejection …
Nucs Nov 9, 2026
c99f0d8
docs(parity-qa): row 06:13 - numpy.matrix widens QB-57 (kron) and QB-…
Nucs Nov 9, 2026
39a4590
docs(parity-qa): rows 06:17 / 06:18 - gcd / lcm, nancum*, triangular …
Nucs Nov 9, 2026
efbd518
docs(parity-qa): rows 06:20 / 06:21 - scalar formatters and the inser…
Nucs Nov 9, 2026
eef7820
docs(parity-qa): rows 06:23 / 06:24 - histogram bin estimators and ei…
Nucs Nov 9, 2026
aecc7fc
docs(parity-qa): row 06:25 - C# spellings of pad / tile / repeat widt…
Nucs Nov 9, 2026
4a276cc
docs(parity-qa): rows 06:26 / 06:28 - the nonzero family at 0-d / emp…
Nucs Nov 9, 2026
a691968
docs(parity-qa): rows 06:30 / 06:31 and the Summary's final counts - …
Nucs Nov 9, 2026
3d8a992
test(parity-qa): QB-62 - count parameters declared int refuse NumPy's…
Nucs Nov 9, 2026
e030009
docs(parity-qa): row 06:38 - QB-62's neighbours typed: extent tuples …
Nucs Nov 9, 2026
7f92848
docs(parity-qa): row 06:39 - QB-62 reaches hsplit / vsplit / dsplit, …
Nucs Nov 9, 2026
89f63b6
docs(parity-qa): row 06:41 - QB-62's last neighbours bind (clean); th…
Nucs Nov 9, 2026
aa23534
docs(parity-qa): row 06:42 - axis arithmetic from a.ndim binds everyw…
Nucs Nov 9, 2026
a13c801
Merge branch 'perf/ort-bridge-run' into journey5: the ONNX Runtime br…
Nucs Nov 9, 2026
dbdefe2
Merge branch 'perf/edge-select' into journey5: np.(arg)partition find…
Nucs Nov 9, 2026
7f1c8fd
test(analyzer): OpenBugs reproduction - the [NDScoped] gate refuses a…
Nucs Nov 8, 2026
64e599f
test(openbugs): OpenBugs.Consumers.cs pins two findings of the Bigtre…
Nucs Nov 9, 2026
1c9cd45
test(oracle): cast_boundary - float32/float64 -> int8/uint8/int16/uin…
Nucs Nov 9, 2026
79d8360
test(openbugs): OpenBugs.Consumers.cs pins SharpCV's finding - copy()…
Nucs Nov 9, 2026
8863b55
fix(onnxruntime): the bridge reads XNNPACK's outputs (CPU memory unde…
Nucs Nov 9, 2026
4cf68e1
Merge branch 'openbugs/memmap-fortran-release' into openbugs/kokorosh…
Nucs Nov 9, 2026
aa32f14
test(openbugs): OpenBugs.Consumers.KokoroSharp.cs pins three findings…
Nucs Nov 9, 2026
a4d8c42
Merge branch 'perf/float-to-int-cast-no-truncate' into journey5: ever…
Nucs Nov 9, 2026
975b983
Merge branch 'openbugs/ort-bridge-cpu-memory' into journey5: the ONNX…
Nucs Nov 9, 2026
a58584e
build(numpy)!: NumPy 2.5.4 is the pin, written once in numpy-version.…
Nucs Nov 9, 2026
d691e24
build(openblas): NumSharp.Interop.OpenBLAS bundles scipy-openblas 0.3…
Nucs Nov 9, 2026
3e73c62
feat(linalg)!: NumPy 2.5's linear algebra - eig / eigvals always comp…
Nucs Nov 9, 2026
ea39e34
feat(random)!: NumPy 2.5's random module - Generator's BTPE binomial …
Nucs Nov 9, 2026
696c938
feat(ma): NumPy 2.5's numpy.ma - a stored fill_value no longer follow…
Nucs Nov 9, 2026
a6d12ea
feat(fft): NumPy 2.5's np.fft - ifft2, irfft2 and hfft hand the calle…
Nucs Nov 9, 2026
72da011
feat(strings)!: NumPy 2.5's text behavior - StringDType compares ever…
Nucs Nov 9, 2026
dc529b7
feat(sort)!: NumPy 2.5's sorting and searching - np.sort / np.argsort…
Nucs Nov 9, 2026
0f2578f
feat(reductions)!: NumPy 2.5's accumulate out= check and quantile res…
Nucs Nov 9, 2026
e85c7e8
feat(dtypes)!: NumPy 2.5's dtype surface - the bare 'a' bytes alias i…
Nucs Nov 9, 2026
7d245c0
feat(core)!: NumPy 2.5's smaller behavior changes - np.where re-makes…
Nucs Nov 9, 2026
5215aba
test(oracle): every corpus regenerated under NumPy 2.5.4, and the cas…
Nucs Nov 9, 2026
69673bc
build(coverage): the coverage inventory is generated against the pinn…
Nucs Nov 9, 2026
de1acf1
docs: the guides, rules, skills and website name NumPy 2.5.4 as the o…
Nucs Nov 9, 2026
9694788
Merge branch 'openbugs/kokorosharp-followups' into journey5: [OpenBug…
Nucs Nov 9, 2026
d19616c
docs(plans): the internal surface map re-scanned on journey5 9694788e…
Nucs Nov 10, 2026
fddc79b
feat(api): the owner's sealed-class and internal-property decisions o…
Nucs Nov 10, 2026
b4269b9
fix(exceptions)!: every Python-named exception reads Python's str() w…
Nucs Nov 10, 2026
1a42817
feat(creation): np.array / np.asanyarray under the character dtype np…
Nucs Nov 10, 2026
5be5e44
fix(subtract): two bool operands subtract in the loop dtype= names - …
Nucs Nov 10, 2026
baa6fd2
feat(creation)!: np.linspace takes NumPy's array_like ends and comput…
Nucs Nov 10, 2026
9bb422b
Merge branch 'fix/gym-net-gaps' into journey5: Gym.NET's four NumShar…
Nucs Nov 10, 2026
30b29b4
feat(exceptions): every exception class of CPython 3.12 and NumPy 2.4…
Nucs Nov 11, 2026
ef236b5
feat!(exceptions): NumSharp raises Python's classes wherever NumPy / …
Nucs Nov 11, 2026
6bf66d5
docs(exceptions): the exceptions page lists every Python and NumPy cl…
Nucs Nov 11, 2026
3a615e2
Merge branch 'feat/python-exceptions' into journey5: NumSharp has eve…
Nucs Nov 11, 2026
81fce22
feat(exceptions): every public exception class takes .NET's standard …
Nucs Nov 11, 2026
5b2c637
Merge branch 'feat/exception-cause-ctors' into journey5: every public…
Nucs Nov 11, 2026
8e75156
feat(scalars)!: NumPy's scalar seams - a 0-d NDArray is NumPy's scala…
Nucs Nov 11, 2026
de10bd0
test(scalars): pin np.asanyarray's scalar-with-dtype conversion as [O…
Nucs Nov 11, 2026
05470c7
feat(scalars): NumPy's scalar class calls - np.float64(1.5), np.int8(…
Nucs Nov 11, 2026
3bd3e14
test(openbugs): OpenBugs.Consumers.OptunaSharp.cs pins OptunaSharp's …
Nucs Nov 11, 2026
b776ed2
perf(scalars): the class call stores a C# value of the class's own st…
Nucs Nov 11, 2026
a8bedd2
feat(api-parity)!: batch 1 of the validated change list - 13 np.* fix…
Nucs Nov 11, 2026
0c26562
Merge branch 'api-parity/batch-01' into journey5: API-parity batch 1 …
Nucs Nov 11, 2026
40e0946
feat(scalars)!: NumPy's return points for 0-d results (S2a) - every u…
Nucs Nov 11, 2026
a4e6577
feat(api-parity)!: batch 2 of the validated change list - the 15 pick…
Nucs Nov 11, 2026
6e14235
Merge branch 'api-parity/batch-02' into journey5: API-parity batch 2 …
Nucs Nov 11, 2026
485a396
feat(scalars)!: NumPy's element access (S2b) - a full integer index (…
Nucs Nov 11, 2026
22f8c75
Merge branch 'feat/numpy-scalars' into journey5: NumPy scalars as 0-d…
Nucs Nov 11, 2026
cff912a
feat(api-parity)!: batch 3 of the validated change list - the 8 picks…
Nucs Nov 11, 2026
36040d1
Merge branch 'api-parity/batch-03' into journey5: API-parity batch 3 …
Nucs Nov 11, 2026
ca05588
feat(api-parity)!: batch 4 of the validated change list - the NDAxis …
Nucs Nov 12, 2026
f9991a5
Merge branch 'api-parity/batch-04' into journey5: API-parity batch 4 …
Nucs Nov 12, 2026
456b287
Merge branch 'openbugs/quantile-signed-zero-tie' into journey5: [Open…
Nucs Nov 12, 2026
6a3757d
feat(api-parity)!: batch 5 of the validated change list - NumPy's tup…
Nucs Nov 12, 2026
0fe1bb5
fix(coverage)!: generator 1.17.0, the coverage review of 2026-11-12 -…
Nucs Nov 12, 2026
1f05986
Merge branch 'api-parity/batch-05' into journey5: API-parity batch 5 …
Nucs Nov 12, 2026
24b3c76
docs(api-parity): API_PARITY_DIFF.md regenerated on 0fe1bb5e + batch …
Nucs Nov 12, 2026
3000d50
docs(readme): an Integrations section with a neon diagram of NumSharp…
Nucs Nov 12, 2026
1d45cbd
Merge branch 'docs/integrations-diagram' into journey5: the README's …
Nucs Nov 12, 2026
516d003
feat(interop): NumSharp.Interop.TorchSharp - NDArray <-> TorchSharp t…
Nucs Nov 12, 2026
3d4bdd4
Merge branch 'feat/interop-torchsharp' into journey5: NumSharp.Intero…
Nucs Nov 12, 2026
e9c38c2
test(openbugs): OpenBugs.Consumers.OptunaSharp.cs pins two costs of n…
Nucs Nov 12, 2026
103fd0d
fix(partition)!: QB43 - several kth run NumPy's introselect_ statemen…
Nucs Nov 12, 2026
3820303
Merge branch 'fix/qb43-introselect-ties' into journey5: QB43 - severa…
Nucs Nov 12, 2026
d4038f1
test(interop-torchsharp): the NDArray / tensor STATE MATRIX - 45 arra…
Nucs Nov 12, 2026
815f15d
Merge branch 'test/interop-torchsharp-states' into journey5: the NDAr…
Nucs Nov 12, 2026
1a23575
feat(api-parity)!: batch 6 of the validated change list - the owner's…
Nucs Nov 12, 2026
adb8035
Merge branch 'api-parity/batch-06' into journey5: API-parity batch 6 …
Nucs Nov 12, 2026
ffdee4f
test(einsum): the default np.einsum keeps its pairwise BLAS contracti…
Nucs Nov 12, 2026
33fffa1
fix(prod)!: float32 / float64 np.prod is NumPy's sequential multiply.…
Nucs Nov 12, 2026
36e30b4
docs(interop-torchsharp)!: NumSharp.Interop.TorchSharp is RELEASED fr…
Nucs Nov 12, 2026
88581e8
Merge branch 'docs/interop-torchsharp' into journey5: NumSharp.Intero…
Nucs Nov 12, 2026
4f76cac
Merge branch 'fix/prod-sequential' into journey5: float32 / float64 n…
Nucs Nov 12, 2026
14e3a6b
Merge branch 'docs/einsum-order-decision' into journey5: the default …
Nucs Nov 12, 2026
ac04f16
feat(api-parity)!: batch 7 of the validated change list - np.reshape'…
Nucs Nov 12, 2026
1844f70
Merge branch 'api-parity/batch-07' into journey5: API-parity batch 7 …
Nucs Nov 12, 2026
4be864e
feat(api-parity)!: batch 8 of the validated change list - NumPy's one…
Nucs Nov 12, 2026
6044d32
Merge branch 'api-parity/batch-08' into journey5: API-parity batch 8 …
Nucs Nov 12, 2026
54b4cad
feat(api-parity)!: batch 9 of the validated change list - Shape is a …
Nucs Nov 12, 2026
c2796bd
Merge branch 'api-parity/batch-09' into journey5: API-parity batch 9 …
Nucs Nov 12, 2026
3b8e910
feat(api-parity)!: batch 10 of the validated change list - np.require…
Nucs Nov 12, 2026
d752ad2
Merge branch 'api-parity/batch-10' into journey5: API-parity batch 10…
Nucs Nov 12, 2026
2157872
feat(api-parity)!: batch 11 of the validated change list - result str…
Nucs Nov 13, 2026
cc8fe6a
Merge branch 'api-parity/batch-11' into journey5: API-parity batch 11…
Nucs Nov 13, 2026
76d682e
feat(api-parity)!: batch 12 of the validated change list - np.interp'…
Nucs Nov 13, 2026
dc78dad
Merge branch 'api-parity/batch-12' into journey5: API-parity batch 12…
Nucs Nov 13, 2026
be0ea18
feat(api-parity)!: batch 13 of the validated change list - np.array o…
Nucs Nov 13, 2026
fad1563
Merge branch 'api-parity/batch-13' into journey5: API-parity batch 13…
Nucs Nov 13, 2026
3a63c03
build(version): the release is 0.81.0 - VersionPrefix 0.80.0 -> 0.81.…
Nucs Nov 13, 2026
ac68996
test(parity-qa): QB-59 is a regression pin - np.put(a, 0, 300) binds …
Nucs Nov 13, 2026
749ecee
docs(releases): the 0.81.0 release notes, drafted from a sweep of eve…
Nucs Nov 13, 2026
1c79f14
docs(releases): the 0.81.0 notes carry no commit hashes, as the publi…
Nucs Nov 13, 2026
ccf8a7d
Merge branch 'journey5-2.5.4' into land/numpy-2.5.4: NumPy 2.5.4 beco…
Nucs Nov 13, 2026
d8de56f
test(oracle): every corpus regenerated under NumPy 2.5.4 with journey…
Nucs Nov 13, 2026
46e4c53
docs(row_stack): np.row_stack is kept on purpose after NumPy 2.5 remo…
Nucs Nov 13, 2026
ceff22b
Merge branch 'journey5' into release-0.81.0
Nucs Nov 13, 2026
9bf2d80
test(coverage): np.row_stack borrows np.vstack's oracle contracts as …
Nucs Nov 13, 2026
413178e
Merge branch 'journey5' into release-0.81.0
Nucs Nov 13, 2026
4c11efd
Merge branch 'journey5' into release-0.81.0
Nucs Nov 13, 2026
95e2a7a
fix(coverage-dashboard): the merged dashboard page and its node test …
Nucs Nov 13, 2026
d25e81f
docs(releases): the 0.81.0 notes follow NumPy 2.5.4 and the owner's s…
Nucs Nov 13, 2026
5192851
docs(releases): the 0.81.0 notes carry no commit hashes again, as the…
Nucs Nov 13, 2026
229ea98
fix(interop-parquet): the ParquetNet fill-coercion test expects NumPy…
Nucs Nov 13, 2026
b518d3b
test(math): the Array-API alias test compares its libm point values t…
Nucs Nov 13, 2026
3c94845
ci(interop): the macOS TorchSharp leg installs Homebrew's libomp firs…
Nucs Nov 13, 2026
45d6a5f
Merge branch 'journey5' into release-0.81.0
Nucs Nov 13, 2026
15cc977
docs(releases): the 0.81.0 notes tell macOS users of NumSharp.Interop…
Nucs Nov 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
48 changes: 26 additions & 22 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NumSharp Project Instructions

NumSharp is a .NET port of Python's NumPy targeting 1-to-1 API and behavioral compatibility with NumPy 2.x; the oracle
pins NumPy 2.4.2. `refs/numpy/` is a full clone of NumPy: the authority on API behavior, edge cases and implementation.
pins NumPy 2.5.4. `refs/numpy/` is a full clone of NumPy: the authority on API behavior, edge cases and implementation.

Area rules live in `.claude/rules/*.md` and load when Claude reads or edits a file in their area. The API index below
names the rule for each area: read it before answering a question about that area without opening its files.
Expand Down Expand Up @@ -135,7 +135,7 @@ np Static API class (like `import numpy as np`)

## API index

Tested against NumPy 2.4.2. Each line: the `np.*` names, then the rule that holds the area's details.
Tested against NumPy 2.5.4. Each line: the `np.*` names, then the rule that holds the area's details.
- Array creation: `arange`, `array`, `asanyarray`, `asarray`, `asarray_chkfinite`, `ascontiguousarray`, `asfortranarray`,
`asmatrix`, `bmat`, `copy`, `empty`, `empty_like`, `eye`, `frombuffer`, `full`, `full_like`, `geomspace`, `identity`,
`linspace`, `logspace`, `matrix`, `meshgrid`, `mgrid`, `ndarray`, `ogrid`, `ones`, `ones_like`, `require`, `tri`,
Expand All @@ -144,23 +144,25 @@ Tested against NumPy 2.4.2. Each line: the `np.*` names, then the rule that hold
- Shape manipulation: `append`, `array_split`, `atleast_1d`, `atleast_2d`, `atleast_3d`, `block`, `c_`, `column_stack`,
`concat`, `concatenate`, `delete`, `dsplit`, `dstack`, `expand_dims`, `flatten`, `flip`, `fliplr`, `flipud`, `hsplit`,
`hstack`, `insert`, `intersect1d`, `matrix_transpose`, `moveaxis`, `pad`, `permute_dims`, `r_`, `ravel`, `repeat`,
`reshape`, `resize`, `roll`, `rollaxis`, `rot90`, `setdiff1d`, `setxor1d`, `split`, `squeeze`, `stack`, `swapaxes`,
`tile`, `transpose`, `trim_zeros`, `union1d`, `unique`, `unique_all`, `unique_counts`, `unique_inverse`,
`unique_values`, `unstack`, `vsplit`, `vstack` → `creation-manipulation.md` (`unique.md` for `unique` and `unique_*`;
every axis argument: `axis-arguments.md`).
`reshape`, `resize`, `roll`, `rollaxis`, `rot90`, `row_stack`, `setdiff1d`, `setxor1d`, `split`, `squeeze`, `stack`,
`swapaxes`, `tile`, `transpose`, `trim_zeros`, `union1d`, `unique`, `unique_all`, `unique_counts`, `unique_inverse`,
`unique_values`, `unstack`, `vsplit`, `vstack`; `lib.stride_tricks.as_strided` / `sliding_window_view` →
`creation-manipulation.md` (`unique.md` for `unique` and `unique_*`; every axis argument: `axis-arguments.md`).
- Broadcasting: `are_broadcastable`, `broadcast`, `broadcast_arrays`, `broadcast_to`.
- Math, arithmetic: `abs`, `absolute`, `acosh`, `add`, `arccos`, `arccosh`, `arcsin`, `arcsinh`, `arctan`, `arctan2`,
`arctanh`, `asinh`, `atanh`, `cbrt`, `ceil`, `clip`, `convolve`, `correlate`, `cos`, `cosh`, `deg2rad`, `degrees`,
`divide`, `divmod`, `exp`, `exp2`, `expm1`, `fabs`, `fix`, `float_power`, `floor`, `floor_divide`, `fmod`, `gcd`, `lcm`,
`log`, `log10`, `log1p`, `log2`, `mod`, `modf`, `multiply`, `negative`, `positive`, `power`, `rad2deg`, `radians`,
`reciprocal`, `remainder`, `rint`, `sign`, `sin`, `sinc`, `sinh`, `spacing`, `sqrt`, `square`, `subtract`, `tan`, `tanh`,
`true_divide`, `trunc` → `ufuncs.md` and `float-math.md`.
- Math, reductions: `all`, `amax`, `amin`, `any`, `argmax`, `argmin`, `average`, `average_returned`, `count_nonzero`,
`cov`, `cumprod`, `cumsum`, `diff`, `ediff1d`, `max`, `mean`, `median`, `min`, `percentile`, `prod`, `ptp`, `quantile`,
`std`, `sum`, `var` → `reductions.md` (median / percentile / quantile: `quantile.md`).
- Math, arithmetic: `abs`, `absolute`, `acos`, `acosh`, `add`, `arccos`, `arccosh`, `arcsin`, `arcsinh`, `arctan`,
`arctan2`, `arctanh`, `asin`, `asinh`, `atan`, `atan2`, `atanh`, `cbrt`, `ceil`, `clip`, `convolve`, `correlate`, `cos`,
`cosh`, `deg2rad`, `degrees`, `divide`, `divmod`, `exp`, `exp2`, `expm1`, `fabs`, `fix`, `float_power`, `floor`,
`floor_divide`, `fmod`, `gcd`, `interp`, `lcm`, `log`, `log10`, `log1p`, `log2`, `mod`, `modf`, `multiply`, `negative`,
`positive`, `pow`, `power`, `rad2deg`, `radians`, `reciprocal`, `remainder`, `rint`, `sign`, `sin`, `sinc`, `sinh`,
`spacing`, `sqrt`, `square`, `subtract`, `tan`, `tanh`, `true_divide`, `trunc` → `ufuncs.md` and `float-math.md`
(`acos`, `asin`, `atan`, `atan2`, `pow`: NumPy 2.0's Array-API names, forwarding to the originals).
- Math, reductions: `all`, `amax`, `amin`, `any`, `argmax`, `argmin`, `average`, `count_nonzero`, `cov`, `cumprod`,
`cumsum`, `cumulative_prod`, `cumulative_sum`, `diff`, `ediff1d`, `max`, `mean`, `median`, `min`, `percentile`, `prod`,
`ptp`, `quantile`, `std`, `sum`, `var` → `reductions.md` (median / percentile / quantile: `quantile.md`).
- Math, NaN-aware: `nanmax`, `nanmean`, `nanmedian`, `nanmin`, `nanpercentile`, `nanprod`, `nanquantile`, `nanstd`,
`nansum`, `nanvar` → `reductions.md` (the nan quantile forms: `quantile.md`).
- Bitwise: `bitwise_and`, `bitwise_or`, `bitwise_xor`, `invert`, `left_shift`, `right_shift` → `ufuncs.md`.
- Bitwise: `bitwise_and`, `bitwise_invert`, `bitwise_left_shift`, `bitwise_or`, `bitwise_right_shift`, `bitwise_xor`,
`invert`, `left_shift`, `right_shift` → `ufuncs.md`.
- Comparison and logic: `all`, `allclose`, `any`, `array_equal`, `equal`, `fmax`, `fmin`, `greater`, `greater_equal`,
`isclose`, `iscomplex`, `iscomplexobj`, `isfinite`, `isin`, `isinf`, `isnan`, `isreal`, `isrealobj`, `isscalar`,
`iterable`, `less`, `less_equal`, `logical_and`, `logical_not`, `logical_or`, `logical_xor`, `maximum`, `minimum`,
Expand Down Expand Up @@ -204,17 +206,19 @@ Tested against NumPy 2.4.2. Each line: the `np.*` names, then the rule that hold
`shuffle`, `standard_cauchy`, `standard_exponential`, `standard_gamma`, `standard_normal`, `standard_t`, `triangular`,
`uniform`, `vonmises`, `wald`, `weibull`, `zipf`, plus `Generator`/`default_rng` → `random.md`.
- File I/O: `fromfile`, `fromstring`, `load`, `load_npy`, `load_npz`, `loadtxt`, `save`, `savetxt`, `savez`,
`savez_compressed`, `tofile`; printing: `array2string`, `array_repr`, `array_str`, `format_float_positional`,
`savez_compressed`, `tofile`, the `np.lib.format` module; printing: `array2string`, `array_repr`, `array_str`, `format_float_positional`,
`format_float_scientific`, `get_printoptions`, `printoptions`, `set_printoptions` → `io-printing.md` (the text
functions: `text-io.md`).
- Other: `around`, `asscalar`, `copyto` (`creation-manipulation.md`), `round_`, `size`, `multithreading`.
- Other: `around`, `asscalar`, `copyto` (`creation-manipulation.md`), `ndim`, `round`, `shape`, `size`, `multithreading`,
the `np.lib.array_utils` module (`axis-arguments.md`).
- Operators: arithmetic `+`, `-`, `*`, `/`, `%`, unary `-`; comparison `==`, `!=`, `<`, `>`, `<=`, `>=` (they return
`NDArray<bool>`); logical `&`, `|`, `!`.
- Indexing: integers and slice strings (`nd[0]`, `nd["1:3"]`, `nd["::-1"]`), boolean masks (`nd[mask]`, and
`nd[mask] = v`), fancy indexing (`nd[indices]`). A raw `int[]`/`long[]` as the ONLY index is fancy (`nd[new int[]{0,2}]` selects rows 0 and 2); `nd[0,2]`
is a coordinate, and coordinate access by array is `nd.GetData(int[]/long[])` → `selection-indexing.md`.
- Interop packages (OpenBLAS, ONNX Runtime, ML.NET, System.Numerics.Tensors, pythonnet) → `openblas.md`,
`interop-packages.md`. ParquetNet is UNRELEASED: no package, no docs, no mention in release notes.
- Interop packages (OpenBLAS, ONNX Runtime, ML.NET, System.Numerics.Tensors, TorchSharp, pythonnet) → `openblas.md`,
`interop-packages.md`. ParquetNet is UNRELEASED: no package, no docs, no mention in release notes (TorchSharp ships
from 0.81.0).

## Build and test

Expand Down Expand Up @@ -344,15 +348,15 @@ Create issues on `SciSharp/NumSharp` with `gh issue create` (`GH_TOKEN` through
| Rule | Holds |
|------|-------|
| `openblas.md` | the `IBlasBackend` seam; `NumSharp.Interop.OpenBLAS`: why it exists, the bundled binary and discovery order, the macOS loader, the build-time override, what decides the result bits, API, gates, examples |
| `interop-packages.md` | the unreleased-package policy; ONNX Runtime, ML.NET, System.Numerics.Tensors (sources, verbs, dtypes, lifetime, gates); the pythonnet examples |
| `interop-packages.md` | the unreleased-package policy; ONNX Runtime, ML.NET, System.Numerics.Tensors, TorchSharp (sources, verbs, dtypes, lifetime, gates; TorchSharp's state-matrix oracle and coverage recipe); the pythonnet examples |
| `kernels.md` | the two IL generators' contracts, shared infrastructure, coverage, kernel rules, float16 techniques, NaN operand order, the 2-D block kernel and its stationary-out mode, broadcast pattern stages, reversed runs |
| `memory-views.md` | `Shape` (fields, flags, sharing), Slice / broadcasting / operator internals, views and aliases, allocation from a view's Shape, the buffer pool |
| `creation-manipulation.md` | `np.arange`, `np.ndarray`, the `as*` family, object-list coercion, full / ones / eye, `np.frombuffer`, linspace / logspace / geomspace, set routines, flips / transposes, stacking, resize / tolist, allocation and reshape guards, `np.copyto` |
| `unique.md` | `np.unique` (`UniqueResult`, the axis path, NumPy's flat routes) and the Array-API unique family, the hash path |
| `axis-arguments.md` | `Shape.check_and_adjust_axis` / `normalize_axis_tuple`, the rules every axis argument follows, NumPy's errors around axes |
| `matrix.md` | `NDMatrix`: static type versus object (woven mechanisms), scalars, indexing, operators and scaling, reductions, construction, divergences, gates |
| `ufuncs.md` | the ufunc surface (`dtype=`, `out=`, `where=`), the result layout, fix, fabs, clip, divmod, float_power, power's float loops, gcd / lcm, bitwise |
| `float-math.md` | correlate / convolve, inverse hyperbolic, sinc, the float32 kernels ported from NumPy, exp2, expm1 / log1p, complex128 NaN signs |
| `float-math.md` | correlate / convolve, np.interp's fill values, inverse hyperbolic, sinc, the float32 kernels ported from NumPy, exp2, expm1 / log1p, complex128 NaN signs |
| `reductions.md` | the reduce prologue, sum / mean, var / std, numpy.ma mean / var, max / min / ptp schedules and keywords, float16 HALF loops, the scans, cov, the NaN-aware family |
| `quantile.md` | the quantile family: `q`'s dtype and the lerp, `out=`, the nan forms, `weights=`, the partition |
| `masked-arrays.md` | numpy.ma: semantics by result kind, the fill value, the set routines, `ma.put`, text and `StringDType` |
Expand Down
4 changes: 2 additions & 2 deletions .claude/commands/np-function.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
name: np-function
description: Implement a NumPy np.* function in NumSharp with full API parity, optimizations, and variation coverage (NumPy 2.4.2 source of truth).
description: Implement a NumPy np.* function in NumSharp with full API parity, optimizations, and variation coverage (NumPy 2.5.4 source of truth).
argument-hint: <np.function_name or description>
---

When user requests /np-function, you are to follow these instructions carefully!:

# np-function command

We are looking to support NumPy's np.* to the fullest. we are aligning with NumPy 2.4.2 as source of truth and are to provide exact same API (np.* overloading) as NumPy does.
We are looking to support NumPy's np.* to the fullest. we are aligning with NumPy 2.5.4 (the pin in `numpy-version.txt`) as source of truth and are to provide exact same API (np.* overloading) as NumPy does.
This session we focusing on: """$ARGUMENTS"""
You job is around interacting with np.* functions - no more than one unless they are closely related.

Expand Down
62 changes: 58 additions & 4 deletions .claude/rules/axis-arguments.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
---
paths:
- "src/NumSharp.Core/View/Shape.Axes.cs"
- "src/NumSharp.Core/View/NDAxis.cs"
- "src/NumSharp.Core/Exceptions/AxisError.cs"
- "src/NumSharp.Core/Exceptions/AxisOutOfRangeException.cs"
- "src/NumSharp.Core/Backends/Default/Math/Reduction/ReductionArguments.cs"
- "test/NumSharp.Tests/Manipulation/AxisArgumentParity.Test.cs"
- "test/NumSharp.Tests/APIs/KeptAxisOverloads.cs"
- "test/NumSharp.Tests.Build.Analyzer/AxisOverloadResolutionTests.cs"
---

# Axis arguments
Expand All @@ -21,7 +23,59 @@ type-strict, zero-excuse `axis_args.jsonl` oracle tier, the `evaluate.jsonl` tie
- `Shape.normalize_axis_tuple(axis, ndim, argname, allow_duplicate)` is NumPy's function: a NEW array (the caller's is
never rewritten), every axis range-checked before the repeat check, a repeat NumPy's `ValueError "repeated axis"` /
`"repeated axis in \`{argname}\` argument"` (never silently removed).
- `AxisOutOfRangeException` is `[Obsolete]` and derives from `AxisError`: nothing in NumSharp raises it.
- `AxisError` is the only axis exception: the legacy `AxisOutOfRangeException` (parenthesized text, never raised) is
deleted, as is every removed member (no `[Obsolete]` shims).
- `np.lib.array_utils` (`APIs/np.lib.array_utils.cs`) is NumPy's public module over these ports:
`normalize_axis_index(axis, ndim, msg_prefix)` is `Shape.check_and_adjust_axis`, `normalize_axis_tuple(axis, ndim,
argname, allow_duplicate)` `Shape.normalize_axis_tuple` (an `NDAxis`, with the kept `int` and `int[]` forms), and
`byte_bounds(a)` the `(low, high)` byte addresses NumPy derives from `__array_interface__` (a C-contiguous array's
`size * itemsize`, else `(n - 1) * stride` per axis to the low or the high end, then one item).
- `NDAxis` (`View/NDAxis.cs`, the owner's OD1) is NumPy's axis argument as one type: a function whose NumPy default is
`axis=None` takes `NDAxis? axis = null`, one whose axis is required `NDAxis axis` (np.expand_dims, np.moveaxis). It
converts implicitly from `int` (lifted: an `int?` too, null = None), `int[]` (a null array is None for `NDAxis?` and an
ArgumentNullException for `NDAxis`), `(int, int)` and `(int, int, int)`, and has public constructors for the same
values. It only HOLDS the axes as given: each function normalizes them itself, because NumPy's functions read an axis
four ways - `normalize_axis_tuple` (`NDAxis.Normalize`; flip, expand_dims, moveaxis, the quantile family, average,
trim_zeros, size, gradient, roll with `allow_duplicate`: every range, then "repeated axis"), the ufunc reduction (sum /
prod / max / min / all / any / ptp / the nan reductions / the sum behind count_nonzero: the out / where converters,
every range, then "duplicate value in 'axis'", and the INTEGER axis 0 / -1 of a 0-d input), `_count_reduce_items`
(np.mean / var / std: each item's range from the count, the repeat only from the sum after its out check, so
`np.mean(a, (0, 0), out=read_only)` is the read-only error and `np.var`'s the repeat) and `PyArray_ConvertMultiAxis`
(squeeze: each item's range and repeat in order, so `(0, 0, 5)` is the repeat); np.argmax / argmin take ONE integer
(a tuple of any length is `TypeError "'tuple' object cannot be interpreted as an integer"`, before the out), and so do
np.nanargmax / nanargmin, whose NumPy statements reduce the NaN mask over the tuple first (`np.all(mask, axis)`: its
AxisError, "duplicate value in 'axis'" and "All-NaN slice encountered" come before the TypeError; an integer or empty
input has no mask) and chararray.argmax / argmin (the TypeError before the finalize error). `IsTuple`
tells `1` from `(1,)` (Python's `1 != (1,)`); `default(NDAxis)` and `new NDAxis()` are the EMPTY tuple. Trap: the null
literal converts to `NDAxis` through the `int[]` operator, so `flag ? null : someAxis` is typed `NDAxis` and throws -
write `(NDAxis?)null`. NumSharp.Build hands an `NDAxis` axis to a `[ReducesThrough]` collapse as it is
(`NDSubclass.CollapseAxes`, the weaver's `EmitAxisValue`), so `matrix._collapse` keeps a tuple's kept-dims matrix (the
1 x 1 matrix for `(0, 1)`, the whole matrix for `()`); an `int` / `int?` axis keeps `Collapse`.
- The KEPT INTEGER OVERLOADS (the owner's API-parity batch-6 decision, "keep the int and int[] overloads ... for
allllll overloads", after a resolution proof): every public np / ndarray / chararray / np.fft / np.linalg member that
takes NumPy's axis as `NDAxis?` / `NDAxis` has an `int axis` and an `int[] axis` overload beside it, WITHOUT defaults
(a parameter before the axis loses its default too: norm's `ord`, trim_zeros' `trim`, gradient's spacing), each a
documented one-line forward that casts to the NDAxis member (every answer, error, layout and subclass result is that
member's; the woven matrix arm is reached through it). A one-integer axis (argmax / argmin / nanargmax / nanargmin,
ndarray and chararray methods included) keeps `int? axis` instead (no int[]: NumPy refuses a tuple). moveaxis keeps
`(int, int)` and `(int[], int[])`. The engine (`TensorEngine` members) and numpy.matrix (its static-type `int`
overloads) are outside the decision. The binding rules this gives, proven at C# 12 (net8.0) and C# 14 (net10.0) on
mimics (scratchpad probe_axis) and pinned against the real members at C# 12 by
`Build.Analyzer/AxisOverloadResolutionTests.cs`: an int-typed argument (a literal, an int / short / byte / char
variable) binds `int`; an `int[]` and a bare `null` bind `int[]` (null converts to `int[]` better than to `NDAxis?`; a
null array is None); every other spelling (tuples, NDAxis values, an `int?` variable, an omitted axis) binds the NDAxis
member. Why the kept integer is `int`, never `int?`, beside an `int[]`: with `int?`, `f(a, null)` is CS0121 ambiguous.
Why a one-integer axis keeps `int?`: with a plain `int`, `f(a, default)` would silently be axis 0. The one spelling the
three overloads refuse is `f(a, default)` (CS0121, `int` vs `int[]`) - a compile error, never a silent answer. A
NumPy-signature test or tool counts overloads WITHOUT the kept forwards: `KeptAxisOverloads.WithoutKeptIntegerForms`
(tests), `drop_kept_axis_forwards` (tools/api-parameter-parity/signature_diff.py, coverage/signature_parity.py) - a
structural rule (integer-typed axis parameters AND an NDAxis sibling with otherwise the same parameter names and types),
never a list, so a stray integer overload without its NDAxis member still counts.
- The reductions route a tuple by `ReductionArguments.TryIntegerForm`: a set of ONE axis takes the integer route and a
set of EVERY axis the None route (NumPy builds the same flags, so the exact schedules and the text routes are reused);
every other tuple (two axes or more short of every axis, the empty tuple of an input with dimensions, or a tuple NumPy
refuses) takes the function's NumPy statements over the set, which raise in NumPy's order
(`Default.Reduction.AxisSet.cs`, `reductions.md`).

Rules every caller follows:
- Never wrap then test. `while (axis < 0) axis += ndim` accepts `-ndim - 1` (wrapping twice, to the last axis) and
Expand All @@ -30,8 +84,8 @@ Rules every caller follows:
- Check before every shortcut. `ReductionArguments.CheckReduceAxis` (PyUFunc_GenericReduction's integer branch: a 0-d
input takes 0 / -1 and nothing else) runs first in prod / max / min / nanmax / nanmin, whose 0-d and one-element
shortcuts would otherwise answer any axis; likewise cumsum / cumprod / argmax / argmin / compress.
- 0-d inputs: the ufunc reductions, `count_nonzero` and `squeeze` accept axis 0 / -1 of a 0-d input (no axis selected)
and report every other axis against rank 0; the `PyArray_CheckAxis` functions (argmax / argmin / argsort / cumsum /
- 0-d inputs: the ufunc reductions, `count_nonzero` and `squeeze` accept the INTEGER axis 0 / -1 of a 0-d input (no axis
selected; a tuple `(0,)` is an AxisError, `()` selects nothing) and report every other axis against rank 0; the `PyArray_CheckAxis` functions (argmax / argmin / argsort / cumsum /
cumprod / take / compress / repeat / packbits / unpackbits) ravel a 0-d input first and report rank 1; `np.sort`,
`np.rollaxis`, the tuple forms and `np.linalg.norm` / `vector_norm` (a tuple reduce) refuse every axis.
- Python's IndexError where NumPy reads `a.shape[axis]` first: `np.split` / `np.array_split` (before the sections
Expand Down
Loading
Loading