You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create comprehensive Array API Standard documentation page covering:
- What the standard is and why it matters
- The fragmentation problem it solves
- Which libraries have adopted it
- All 14 required data types with C# equivalents
- All 5 required constants
- All 7 required array attributes (dtype, device, mT, etc.)
- Full operator requirements
- All 133 core functions by category with NumSharp status
- Type promotion rules (same-kind, cross-kind, scalar)
- Optional extensions (linalg: 23 functions, fft: 14 functions)
- What's NOT in scope (I/O, strings, datetime, etc.)
- Real-world use cases (SciPy, einops, xtensor, JIT)
- NumSharp's path to compliance with coverage percentages
Also update NumPy Compliance page to reference this new page
instead of duplicating Array API details.
Copy file name to clipboardExpand all lines: docs/website-src/docs/compliance.md
+21-64Lines changed: 21 additions & 64 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,8 @@ NumPy 2.0 (released April 2024) was a major breaking release. It changed how typ
37
37
38
38
The Python Array API Standard is an industry consortium effort to define a common API that works across array libraries. Write code against the Array API, and it runs on NumPy, PyTorch, JAX, CuPy, or Dask without changes. NumPy adopted it in version 2.0.
39
39
40
+
**Deep Dive:**[Array API Standard](array-api-standard.md) — Our dedicated page with full specification details
41
+
40
42
**Tracking:**[Array API Standard Milestone](https://github.com/SciSharp/NumSharp/milestone/6)
41
43
42
44
### 3. NumPy Enhancement Proposals (NEPs)
@@ -191,70 +193,25 @@ Most of the time, you won't notice. But if you're:
191
193
192
194
---
193
195
194
-
## Array API Standard: Function Coverage
195
-
196
-
The Array API Standard requires 133 functions in the core specification. Here's where NumSharp stands:
197
-
198
-
### Creation Functions (16 required)
199
-
200
-
| Function | NumSharp | Notes |
201
-
|----------|----------|-------|
202
-
|`arange`| ✅ ||
203
-
|`asarray`| ✅ ||
204
-
|`empty`| ✅ ||
205
-
|`empty_like`| ✅ ||
206
-
|`eye`| ✅ ||
207
-
|`from_dlpack`| ❌ | DLPack interop not implemented |
208
-
|`full`| ✅ ||
209
-
|`full_like`| ✅ ||
210
-
|`linspace`| ✅ ||
211
-
|`meshgrid`| ✅ ||
212
-
|`ones`| ✅ ||
213
-
|`ones_like`| ✅ ||
214
-
|`tril`| ❌ ||
215
-
|`triu`| ❌ ||
216
-
|`zeros`| ✅ ||
217
-
|`zeros_like`| ✅ ||
218
-
219
-
**Coverage: ~87%** — Missing `tril`, `triu`, and `from_dlpack`.
220
-
221
-
### Element-wise Functions (67 required)
222
-
223
-
This is our biggest category and we have good coverage (~75%), but we're missing some functions:
224
-
225
-
**Missing:**
226
-
-`bitwise_left_shift`, `bitwise_right_shift` (we have `<<`, `>>` operators but not named functions)
- Complex-number functions (`conj`, `imag`, `real`) — blocked on complex type support
230
-
231
-
### Statistical Functions (9 required)
232
-
233
-
| Function | NumSharp | Notes |
234
-
|----------|----------|-------|
235
-
|`max`| ✅ |`amax`|
236
-
|`mean`| ✅ ||
237
-
|`min`| ✅ |`amin`|
238
-
|`prod`| ✅ ||
239
-
|`std`| ✅ | Uses `ddof`, not `correction` parameter |
240
-
|`sum`| ✅ ||
241
-
|`var`| ✅ | Uses `ddof`, not `correction` parameter |
242
-
|`cumulative_sum`| ✅ |`cumsum`|
243
-
|`cumulative_prod`| ❌ ||
244
-
245
-
**Note on std/var:** The Array API uses a `correction` parameter (default 0.0 for population statistics). NumPy uses `ddof` (delta degrees of freedom). They're mathematically equivalent but spelled differently:
246
-
-`std(x, correction=1)` in Array API = `np.std(x, ddof=1)` in NumPy
|`unique_values`| ✅ |`np.unique` without options |
256
-
257
-
NumPy's `np.unique()` is a single function with boolean flags (`return_counts`, `return_inverse`, etc.). The Array API splits this into four focused functions. We only have the basic version.
196
+
## Array API Standard
197
+
198
+
The Array API Standard specifies 133 core functions, 14 data types, and strict type promotion rules. NumSharp currently implements about **74%** of the core specification.
199
+
200
+
| Category | Required | NumSharp | Coverage |
201
+
|----------|----------|----------|----------|
202
+
| Creation | 16 | 13 | 81% |
203
+
| Element-wise | 67 |~50 | 75% |
204
+
| Statistical | 9 | 8 | 89% |
205
+
| Manipulation | 14 | 11 | 79% |
206
+
| Set | 4 | 1 | 25% |
207
+
| Other | 23 |~15 |~65% |
208
+
209
+
**Biggest Gaps:**
210
+
- Complex number types (`complex64`, `complex128`) — blocks FFT and many math functions
211
+
- Set functions (`unique_all`, `unique_counts`, `unique_inverse`)
212
+
- Array properties (`.device`, `.mT`)
213
+
214
+
For the complete specification details, function lists, type promotion rules, and extension coverage, see our dedicated **[Array API Standard](array-api-standard.md)** page.
0 commit comments