numpy-ts v1.3.2
Patch release with a couple of bug fixes and improvements:- Fixed issue with
[Symbol.dispose]not working properly on Safari & old runtimes - Added
wasmFreeBytesto public exports to allow memory usage checks
numpy-ts v1.3.1
Patch release with new WASM kernels, performance improvements, and export fixes.- New WASM kernels:
conj,deg2rad,modf,packbits,nanquantile,argwhere, andfloat32SVD - Optimized WASM SIMD for
argmin/argmaxint16/uint16 paths - Reduced WASM base threshold for earlier WASM dispatch on smaller arrays
- Export fixes:
configureWasm,wasmConfig, andhasFloat16now exported fromcoreandfullentrypoints - Benchmark runner refactored from if-else chain to dictionary lookup
numpy-ts v1.3.0
This is the first release where numpy-ts is faster than native NumPy on average — 1.13x across 7,200 benchmarks, leading in 12 of 18 categories. See the Performance Overview for the full breakdown.v1.3.0 gets there by moving array storage into WebAssembly linear memory for true zero-copy WASM kernel execution, ships a new memory-management API, and brings a stack of NumPy compatibility fixes.- WASM-backed array storage: Arrays now live directly in a shared WebAssembly memory pool (default 256 MiB). WASM kernels operate on these pointers with zero copy-in/copy-out overhead.
- Bandwidth-bound operations (
add,multiply, bitwise) see up to 2.6x improvement - Compute-bound operations (
matmul,svd) see minimal change (already kernel-dominated) - Graceful fallback to JS
TypedArrays when the pool is full - Comes with new
dispose()andconfigureWasm()methods for manual memory management and pool configuration
- Bandwidth-bound operations (
- Browser bundle is ESM. Load via
<script type="module">orimport(). See the CDN section. - Default dtype changes:
arange()now defaults tofloat64(wasint32for integer args), matchingzeros/ones/linspace. Passdtypeexplicitly to opt out.full()integer inference: out-of-range integers now infer toint64instead offloat64. In-range integers still infer toint32.- Index-returning APIs return
float64instead ofint64(argsort,argmax/min,argwhere,nonzero,unravel_index,indices, …) — deliberate NumPy divergence to avoidBigIntfriction.
array()now acceptsTypedArrayinputs.- Various slice correctness fixes (thanks @BorisTheBrave):
- Added `vindex: vectorized multi-dimensional indexing matching NumPy’s integer array indexing semantics. See Advanced Indexing. (#94)
- Slice now supports
'...'(ellipsis) and'newaxis'tokens for compact multi-dim slicing. See Slicing & Indexing. (#84)
in1ddeprecated (matches NumPy 2.4) — useisin.
numpy-ts v1.2.0
The DX release! v1.2.0 brings some quality-of-life upgrades:- Added
float16dtype support:- New half-precision dtype with native
Float16Arrayon modern runtimes (Node 23+, Chrome 127+) andFloat32Arrayfallback on older runtimes. Full NPY round-trip support.
- New half-precision dtype with native
- Complete
randommodule rewrite:- Entire
np.randommodule rewritten as Zig-compiled WASM. Now matches NumPy’s random output bit-for-bit for all distributions with both legacy (MT19937) and modern (PCG64) APIs. - Random functions are now ~6x faster on average.
- Entire
- Simplified bundles:
- Removed CJS bundle. The package is now ESM-only (
dist/numpy-ts.node.cjsremoved). - All 22 file I/O functions now available from
import from 'numpy-ts'— works on Node, Bun, and Deno.numpy-ts/nodeis deprecated (still works as an alias). - 2 build outputs (down from 5) — tree-shakeable ESM + browser IIFE
- Removed CJS bundle. The package is now ESM-only (
- Performance optimizations across the board - yielding an average 20% speedup.
- Cross-runtime test coverage: all 10,000+ tests now run on Node, Bun, Deno, and Chromium
numpy-ts v1.1.0
The performance release! v1.1.0 introduces Zig-compiled WASM microkernels that transparently accelerate compute- and memory-bound operations across the library. numpy-ts remains lightweight, tree-shakeable, and zero-config - just faster.- Implemented 97 WASM-accelerated operations compiled from Zig with 128-bit SIMD
- WASM kernels are embedded as base64, synchronously initialized, and individually tree-shakeable
- Acceleration is fully transparent: same API, same results, no configuration needed
- Generally sped up the entire library by ~8x:
- Arithmetic: ~23x faster (65x slower than NumPy → 2.75x)
- Linear Algebra: ~19x faster (61x → 3.2x)
- Logic: ~27x faster (48x → 1.8x)
- Manipulation: ~9x faster (15x → 1.6x)
- Gradient: ~60x faster (30x slower → 2x faster than NumPy)
- FFT: ~3x faster (22x → 8x)
- Random: ~6x faster (11x → 1.9x)
- Indexing: ~5.5x faster (12x → 2.2x)
- Added bracket indexing (
arr[i],arr[i][j],arr[i] = val) on all NDArray instances via Proxy - Added multi-axis reductions:
amin,amax,median,all,any,nanmin,nanmaxnow acceptaxis: number[] - Added batched linear algebra:
eig,eigh,eigvals,eigvalsh,cholesky,pinv,slogdet,matrix_normsupport[..., n, n]batch inputs - Added
uniqueaxis parameter: find unique rows, columns, or slices along any axis - Added
apply_along_axisND support: now works with arrays of any dimensionality - Unified
slice()implementation: moved from duplicated logic inNDArrayCore/NDArrayto a singleshapeOps.slice()function, and addedsliceKeepDim()for rank-preserving slicing (thanks @BorisTheBrave) - Revamped benchmark suite to thoroughly test all functions and dtype combinations
- Added WASM Acceleration guide
- Added AI Disclosure page
numpy-ts v1.0.0
The first stable release of numpy-ts, providing a comprehensive NumPy implementation for TypeScript and JavaScript.- 476 of 507 NumPy functions implemented (94% API coverage)
- Full test suite with 6,000+ tests validated against NumPy
- Zero dependencies: pure TypeScript, no native modules or WebAssembly
- Universal runtime support for Node.js, Bun, Deno, and browsers
- Tree-shakeable ESM build for minimal bundle sizes
numpy-ts v0.13.0
- Implemented fft functions by @dupontcyborg in #42
- Implemented all missing random distribution functions (36 functions) by @dupontcyborg in #43
- Pre-1.0.0 improvements by @dupontcyborg in #44
- Refactored library to be tree-shakeable by @dupontcyborg in #46
numpy-ts v0.12.0
- Added missing functions for reductions, array creation, and array manipulation by @dupontcyborg in #37
- Added missing functions for statistics, bit operations, and set operations by @dupontcyborg in #38
- Implemented complete linear algebra coverage (100%) by @dupontcyborg in #39
- Implemented other math and utilities functions by @dupontcyborg in #40
- Implemented polynomial and type checking functions by @dupontcyborg in #41
numpy-ts v0.10.0
- Implemented statistics functions (bincount, digitize, histogram, histogram2d, histogramdd, correlate, convolve, cov, corrcoef) by @dupontcyborg in #27
- Implemented np.random module with 17 functions by @dupontcyborg in #28
- Implemented logic functions for 100% category coverage by @dupontcyborg in #29
- Full API tracking by @dupontcyborg in #30
- Implemented feature gap analysis and missing NDArray properties by @dupontcyborg in #31
- Implemented miscellaneous missing methods by @dupontcyborg in #32
- Bumped workflow Node versions to 24 by @dupontcyborg in #33
numpy-ts v0.6.0
- Added missing minor functions by @dupontcyborg in #16
- Implemented missing arithmetic and linear algebra functions by @dupontcyborg in #17
- Implemented complete array creation and manipulation functions by @dupontcyborg in #18
- Implemented remaining reductions by @dupontcyborg in #19