numpy-ts 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
4
4
  [![npm version](https://img.shields.io/npm/v/numpy-ts)](https://www.npmjs.com/package/numpy-ts)
5
5
  ![bundle size](https://img.shields.io/bundlephobia/minzip/numpy-ts)
6
- ![numpy api coverage](https://img.shields.io/badge/numpy_api_coverage-71%20%25-yellow)
6
+ ![numpy api coverage](https://img.shields.io/badge/numpy_api_coverage-85%20%25-yellow)
7
7
 
8
8
  ```
9
9
  ███╗ ██╗██╗ ██╗███╗ ███╗██████╗ ██╗ ██╗ ████████╗███████╗
@@ -24,7 +24,7 @@ npm install numpy-ts
24
24
 
25
25
  ## Why numpy-ts?
26
26
 
27
- - **📊 Extensive API** — **238 of 333 NumPy functions (71.5% coverage)**
27
+ - **📊 Extensive API** — **284 of 333 NumPy functions (85.3% coverage)**
28
28
  - **✅ NumPy-validated** — 2000+ test cases cross-validated against Python NumPy
29
29
  - **🔒 Type-safe** — Full TypeScript support with shape and dtype inference
30
30
  - **🌐 Universal** — Works in Node.js and browsers with .npy/.npz file support
@@ -68,26 +68,26 @@ Progress toward complete NumPy API compatibility:
68
68
  | **Bit Operations** | 9/9 | 100% | ✅ |
69
69
  | **Broadcasting** | 3/3 | 100% | ✅ |
70
70
  | **Comparison** | 10/10 | 100% | ✅ |
71
+ | **Exponential** | 9/9 | 100% | ✅ |
72
+ | **Gradient** | 4/4 | 100% | ✅ |
71
73
  | **Hyperbolic** | 6/6 | 100% | ✅ |
72
74
  | **I/O** | 8/8 | 100% | ✅ |
73
75
  | **Indexing** | 20/20 | 100% | ✅ |
74
76
  | **Linear Algebra** | 9/9 | 100% | ✅ |
77
+ | **Linear Algebra (linalg)** | 19/19 | 100% | ✅ |
75
78
  | **Reductions** | 30/30 | 100% | ✅ |
79
+ | **Rounding** | 7/7 | 100% | ✅ |
76
80
  | **Searching** | 6/6 | 100% | ✅ |
81
+ | **Set Operations** | 7/7 | 100% | ✅ |
77
82
  | **Sorting** | 6/6 | 100% | ✅ |
78
83
  | **Trigonometric** | 12/12 | 100% | ✅ |
79
- | **Exponential** | 0/9 | 0% | 🔴 |
80
84
  | **FFT** | 0/18 | 0% | 🔴 |
81
- | **Gradient** | 0/4 | 0% | 🔴 |
82
- | **Linear Algebra (linalg)** | 0/19 | 0% | 🔴 |
83
85
  | **Logic** | 0/12 | 0% | 🔴 |
84
86
  | **Other Math** | 0/11 | 0% | 🔴 |
85
87
  | **Random** | 0/17 | 0% | 🔴 |
86
- | **Rounding** | 0/7 | 0% | 🔴 |
87
- | **Set Operations** | 0/7 | 0% | 🔴 |
88
88
  | **Statistics** | 0/9 | 0% | 🔴 |
89
89
 
90
- **Overall: 238/333 functions (71.5% complete)**
90
+ **Overall: 284/333 functions (85.3% complete)**
91
91
 
92
92
  See the complete [API Reference](docs/API-REFERENCE.md) for detailed function list.
93
93
 
@@ -100,7 +100,7 @@ NumPy-compatible type system with automatic promotion:
100
100
  | **Floating Point** ||||
101
101
  | `float64` | ✅ | ✅ | Default dtype |
102
102
  | `float32` | ✅ | ✅ | |
103
- | `float16` | ✅ | ⚠️ | Planned (half-precision) |
103
+ | `float16` | ✅ | ⚠️ | Planned (waiting for [this](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float16Array)) |
104
104
  | **Signed Integers** ||||
105
105
  | `int64` | ✅ | ✅ | Uses BigInt |
106
106
  | `int32` | ✅ | ✅ | |
@@ -195,7 +195,7 @@ const arr = np.parseNpy(await response.arrayBuffer());
195
195
  const bytes = np.serializeNpy(arr);
196
196
  ```
197
197
 
198
- > **Why separate imports?** The `/node` entry includes Node.js `fs` usage. Keeping it separate ensures browser bundles stay clean.
198
+ *Why separate imports?* The `/node` entry includes Node.js `fs` usage. Keeping it separate ensures browser bundles stay clean.
199
199
 
200
200
  ## Examples
201
201
 
@@ -237,12 +237,12 @@ arr.sum(); // Type: number
237
237
 
238
238
  | Feature | numpy-ts | numjs | ndarray | TensorFlow.js |
239
239
  |---------|----------|-------|---------|---------------|
240
- | NumPy API Coverage | 238/333 (71%) | ~20% | Different | ML-focused |
240
+ | NumPy API Coverage | 284/333 (85%) | ~20% | Different | ML-focused |
241
241
  | TypeScript Native | ✅ Full | Partial | ❌ No | ✅ Yes |
242
242
  | NumPy Validated | ✅ 1365+ tests | Mostly | ❌ No | ❌ No |
243
243
  | .npy/.npz Files | ✅ v1/v2/v3 | ❌ No | ❌ No | ❌ No |
244
244
  | Broadcasting | ✅ Full | Limited | Limited | ✅ Full |
245
- | Bundle Size | ~50kb | ~20kb | ~5kb | ~500kb |
245
+ | Bundle Size | <50kb | ~60kb | ~5kb | >100kb |
246
246
 
247
247
  ## Contributing
248
248