Skip to content

Commit 085ed3e

Browse files
committed
docs: NumPy 1.x deprecation audit — plan, findings, and consolidated bug registry
Systematic comparison of NumSharp against NumPy 2.4.2 (v2.4.2) to identify every feature corresponding to deprecated, removed, or behaviorally-changed NumPy 1.x functionality. numpy-1x-deprecation-audit.md (investigation plan): - 7-phase audit covering removed APIs, type promotion (NEP 50), behavioral changes, dead code, documentation URLs, automated scripts, and NUMPY_NUMSHARP_MAP.md cross-check - Grep results confirming which deprecated APIs are/aren't in NumSharp - Python/C# scripts for automated verification numpy-1x-deprecation-findings.md (results): - 5 deprecated/removed functions still present (asscalar, find_common_type, round_, newbyteorder, asfarray reference) - 13 deprecated aliases/constants in np.cs (NaN, Inf, float_, bool8, etc.) - 12 type promotion mismatches in _typemap_arr_scalar (unsigned int array + signed int scalar — NEP 50 "array wins" rule) - 6 behavioral divergences (floor/ceil int→double, unique return_inverse, asarray copy semantics, bool+bool, any(axis) broken, random legacy-only) - 8 new bugs discovered (Bugs 27-63) - 5 NUMPY_NUMSHARP_MAP.md corrections needed - 385 stale documentation URLs across 121 files OpenBugs.md (consolidated bug registry): - All 54 bugs (7 fixed, 47 open) with full details - Organized by category: dead code (13), wrong semantics (7), crashes (12), wrong values (15) - Architectural root cause analysis (broadcast stride/data mismatch, multiple iteration paths, comparison operator inconsistency, dead code pattern) - Dependency graph and recommended fix order for maximum cascade impact - NumPy verification code for every bug CLAUDE.md: Add GitHub Issues section, remove stale quick one-liners.
1 parent 171ed77 commit 085ed3e

File tree

4 files changed

+1643
-23
lines changed

4 files changed

+1643
-23
lines changed

.claude/CLAUDE.md

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ switch (nd.typecode)
306306
}
307307
```
308308

309+
## GitHub Issues
310+
Create issues on `SciSharp/NumSharp` via `gh issue create` when the user requests it. `GH_TOKEN` is available in the environment.
311+
309312
## Build & Test
310313

311314
```bash
@@ -339,29 +342,6 @@ NumSharp uses unsafe in many places, hence include `#:property AllowUnsafeBlocks
339342
#:property AllowUnsafeBlocks=true
340343
```
341344

342-
### Quick One-Liners
343-
344-
```bash
345-
# Run a script with full internal access
346-
dotnet run my_script.cs
347-
348-
# Compare NumPy vs NumSharp type promotion
349-
dotnet run script.cs # where script.cs contains:
350-
# var ct = np._FindCommonType(np.array(1), np.array(1.5));
351-
# Console.WriteLine(ct); // Double
352-
353-
# Inspect Shape internals
354-
dotnet run script.cs # where script.cs contains:
355-
# var s = new Shape(new int[]{2,3,4});
356-
# Console.WriteLine($"dims={string.Join(",",s.dimensions)} strides={string.Join(",",s.strides)} size={s.size}");
357-
358-
# Check ViewInfo after slicing
359-
dotnet run script.cs # where script.cs contains:
360-
# var arr = np.arange(24).reshape(2,3,4);
361-
# var sliced = arr["1, :, ::2"];
362-
# Console.WriteLine($"ViewInfo: {sliced.Shape.ViewInfo != null}, BroadcastInfo: {sliced.Shape.BroadcastInfo != null}");
363-
```
364-
365345
### Key Internal Members Available
366346

367347
| Member | What it exposes |

0 commit comments

Comments
 (0)