numpy-ts 0.6.0 → 0.7.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 +7 -9
- package/dist/numpy-ts.browser.js +2 -2
- package/dist/numpy-ts.esm.js +2 -2
- package/dist/numpy-ts.node-io.cjs +2 -2
- package/dist/numpy-ts.node-io.cjs.map +4 -4
- package/dist/numpy-ts.node-io.mjs +2 -2
- package/dist/numpy-ts.node-io.mjs.map +4 -4
- package/dist/numpy-ts.node.cjs +2 -2
- package/dist/numpy-ts.node.cjs.map +4 -4
- package/dist/types/core/ndarray.d.ts +263 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/ops/advanced.d.ts +68 -0
- package/dist/types/ops/bitwise.d.ts +91 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|

|
|
4
4
|
[](https://www.npmjs.com/package/numpy-ts)
|
|
5
5
|

|
|
6
|
-

|
|
7
7
|
|
|
8
8
|
```
|
|
9
9
|
███╗ ██╗██╗ ██╗███╗ ███╗██████╗ ██╗ ██╗ ████████╗███████╗
|
|
@@ -18,16 +18,14 @@ Complete NumPy implementation for TypeScript and JavaScript
|
|
|
18
18
|
|
|
19
19
|
**⚠️ Under active development** — API may change before v1.0
|
|
20
20
|
|
|
21
|
-
A faithful NumPy 2.0+ implementation for TypeScript/JavaScript, validated against Python NumPy. **192 of 333 NumPy functions (57.7% complete)** covering array creation, manipulation, linear algebra, reductions, and more.
|
|
22
|
-
|
|
23
21
|
```bash
|
|
24
22
|
npm install numpy-ts
|
|
25
23
|
```
|
|
26
24
|
|
|
27
25
|
## Why numpy-ts?
|
|
28
26
|
|
|
29
|
-
- **📊 Extensive API** —
|
|
30
|
-
- **✅ NumPy-validated** —
|
|
27
|
+
- **📊 Extensive API** — **218 of 333 NumPy functions (65.5% coverage)**
|
|
28
|
+
- **✅ NumPy-validated** — 2000+ test cases cross-validated against Python NumPy
|
|
31
29
|
- **🔒 Type-safe** — Full TypeScript support with shape and dtype inference
|
|
32
30
|
- **🌐 Universal** — Works in Node.js and browsers with .npy/.npz file support
|
|
33
31
|
- **🎯 Zero dependencies** — Pure TypeScript, no heavy external libraries
|
|
@@ -67,14 +65,14 @@ Progress toward complete NumPy API compatibility:
|
|
|
67
65
|
| **Arithmetic** | 19/19 | 100% | ✅ |
|
|
68
66
|
| **Array Creation** | 32/32 | 100% | ✅ |
|
|
69
67
|
| **Array Manipulation** | 35/35 | 100% | ✅ |
|
|
68
|
+
| **Bit Operations** | 9/9 | 100% | ✅ |
|
|
70
69
|
| **Broadcasting** | 3/3 | 100% | ✅ |
|
|
71
70
|
| **Comparison** | 10/10 | 100% | ✅ |
|
|
72
71
|
| **Hyperbolic** | 6/6 | 100% | ✅ |
|
|
72
|
+
| **Indexing** | 20/20 | 100% | ✅ |
|
|
73
73
|
| **Linear Algebra** | 9/9 | 100% | ✅ |
|
|
74
74
|
| **Reductions** | 30/30 | 100% | ✅ |
|
|
75
75
|
| **Trigonometric** | 12/12 | 100% | ✅ |
|
|
76
|
-
| **Indexing** | 3/20 | 15% | 🔴 |
|
|
77
|
-
| **Bit Operations** | 0/9 | 0% | 🔴 |
|
|
78
76
|
| **Exponential** | 0/9 | 0% | 🔴 |
|
|
79
77
|
| **FFT** | 0/18 | 0% | 🔴 |
|
|
80
78
|
| **Gradient** | 0/4 | 0% | 🔴 |
|
|
@@ -89,7 +87,7 @@ Progress toward complete NumPy API compatibility:
|
|
|
89
87
|
| **Sorting** | 0/6 | 0% | 🔴 |
|
|
90
88
|
| **Statistics** | 0/9 | 0% | 🔴 |
|
|
91
89
|
|
|
92
|
-
**Overall:
|
|
90
|
+
**Overall: 218/333 functions (65.5% complete)**
|
|
93
91
|
|
|
94
92
|
See the complete [API Reference](docs/API-REFERENCE.md) for detailed function list.
|
|
95
93
|
|
|
@@ -239,7 +237,7 @@ arr.sum(); // Type: number
|
|
|
239
237
|
|
|
240
238
|
| Feature | numpy-ts | numjs | ndarray | TensorFlow.js |
|
|
241
239
|
|---------|----------|-------|---------|---------------|
|
|
242
|
-
| NumPy API Coverage |
|
|
240
|
+
| NumPy API Coverage | 218/333 (65%) | ~20% | Different | ML-focused |
|
|
243
241
|
| TypeScript Native | ✅ Full | Partial | ❌ No | ✅ Yes |
|
|
244
242
|
| NumPy Validated | ✅ 1365+ tests | Mostly | ❌ No | ❌ No |
|
|
245
243
|
| .npy/.npz Files | ✅ v1/v2/v3 | ❌ No | ❌ No | ❌ No |
|