Skip to content

Commit 171ed77

Browse files
committed
test: broadcast audit — bugs 18-24 (cumsum output shape, roll Data<T>, bool mask, reshape, transpose)
Add 7 additional broadcast bugs discovered during systematic broadcast stress testing. These are continuation of the broadcast audit (Bugs 1-17) and document remaining issues where NumSharp uses linear/flat iteration or Data<T>() direct access on broadcast arrays instead of coordinate-based access. New bugs: - Bug 18: cumsum axis creates output with broadcast shape metadata, causing writes via ret[slices] to go to detached clones (garbage output) - Bug 19: roll uses Data<T>() on broadcast arrays, reading past the small source buffer boundary - Bug 21: Boolean mask indexing on 2D+ treats True as row selector instead of element selector, producing wrong output shape - Bug 23: reshape on column-broadcast uses modular arithmetic that walks storage linearly instead of in logical row-major order - Bug 24: transpose on broadcast materializes via Clone but creates plain contiguous strides, losing broadcast semantics Also makes OpenBugs class partial to support the upcoming OpenBugs.DeprecationAudit.cs split. 12 new test methods, all asserting correct NumPy 2.4.2 behavior. Tests fail while bugs exist, pass when fixed.
1 parent 05898eb commit 171ed77

File tree

1 file changed

+601
-1
lines changed

1 file changed

+601
-1
lines changed

0 commit comments

Comments
 (0)