Skip to main content

Documentation Index

Fetch the complete documentation index at: https://numpyts.dev/llms.txt

Use this file to discover all available pages before exploring further.

v1.4.0
2026-05-16

numpy-ts v1.4.0

NumPy-compatibility release. A wide set of public functions gain the kwargs / overloads they were missing relative to NumPy, and several signatures accept ArrayLike so plain number[] no longer needs np.array(...) wrapping.Small (2-5%) performance regressions due to additional correctness checks which will be optimized in a later release.

Breaking

  • meshgrid (numpy-ts/core only) - default indexing is now 'xy' (NumPy-compatible). Previously core/meshgrid had no options and effectively produced 'ij' shapes. If you import meshgrid from numpy-ts/core and relied on the old behavior, pass { indexing: 'ij' } explicitly. Importers from numpy-ts (the full API) are unaffected - that wrapper already defaulted to 'xy'.

New kwargs / overloads

  • Reductions where / initial / dtype - sum, prod, max/amax, min/amin, all, any now accept a ReductionOpts bag as a 4th argument for masked reductions, seeded accumulation, and dtype-controlled accumulation.
  • argmin / argmax - accept keepdims?: boolean (NumPy 1.22+).
  • ptp - axis widened to number | number[], consistent with the other reductions.
  • average - new returned?: boolean. When true, returns [avg, sum_of_weights] matching np.average(..., returned=True).
  • concatenate / concat - axis widened to number | null. axis=null flattens each input and concatenates along axis 0.
  • diff - new prepend? and append? arguments (ArrayLike).
  • interp - new period?: number for circular/phase data; xp is normalized into [0, period) and wraps at the boundary.
  • gradient - per-axis spacing can now be a 1-D coordinate array (non-uniform second-order central-difference), not just a scalar.
  • apply_along_axis - accepts trailing ...args forwarded to func1d, matching np.apply_along_axis(func1d, axis, arr, *args).
  • pad - pad_width and constant_values accept the full NumPy broadcast forms (scalar, [n], [before, after], per-axis scalars, [[b, a]], per-axis pairs, mixed). New exported types PadWidthArg and PadValueArg.
  • meshgrid - MeshgridOptions { indexing?, sparse?, copy? } bag. sparse: true returns open grids; copy: false returns broadcast views.
  • block - accepts nested sequences (NestedNDArrays[]) with NumPy’s innermost-to-outer axis semantics. Flat-list calls behave identically.

ArrayLike widening

These now accept plain number[], nested arrays, and scalars in addition to NDArrayCore. Behavior for existing NDArray callers is unchanged.
  • take - indices: ArrayLike (scalar, 1-D, 2-D, or 3-D). Output preserves the shape of indices.
  • where - x and y are ArrayLike. Also fixes a falsy-zero bug: where(cond, x, 0) now honors the 0 branch instead of falling through to the indices form.
  • select - condlist, choicelist, and defaultVal widened to ArrayLike / ArrayLike[].
  • bincount, digitize, histogram, histogram2d, histogramdd - data, weights, and bin arguments are ArrayLike.
v1.3.2
2026-04-17

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 wasmFreeBytes to public exports to allow memory usage checks
v1.3.1
2026-04-16

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, and float32 SVD
  • Optimized WASM SIMD for argmin/argmax int16/uint16 paths
  • Reduced WASM base threshold for earlier WASM dispatch on smaller arrays
  • Export fixes: configureWasm, wasmConfig, and hasFloat16 now exported from core and full entrypoints
  • Benchmark runner refactored from if-else chain to dictionary lookup
v1.3.0
2026-04-13

numpy-ts v1.3.0

This is the first release where numpy-ts is faster than native NumPy on average1.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() and configureWasm() methods for manual memory management and pool configuration
  • Browser bundle is ESM. Load via <script type="module"> or import(). See the CDN section.
  • Default dtype changes:
    • arange() now defaults to float64 (was int32 for integer args), matching zeros/ones/linspace. Pass dtype explicitly to opt out.
    • full() integer inference: out-of-range integers now infer to int64 instead of float64. In-range integers still infer to int32.
    • Index-returning APIs return float64 instead of int64 (argsort, argmax/min, argwhere, nonzero, unravel_index, indices, …) — deliberate NumPy divergence to avoid BigInt friction.
  • array() now accepts TypedArray inputs.
  • 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)
  • in1d deprecated (matches NumPy 2.4) — use isin.
v1.2.0
2026-03-27

numpy-ts v1.2.0

The DX release! v1.2.0 brings some quality-of-life upgrades:
  • Added float16 dtype support:
    • New half-precision dtype with native Float16Array on modern runtimes (Node 23+, Chrome 127+) and Float32Array fallback on older runtimes. Full NPY round-trip support.
  • Complete random module rewrite:
    • Entire np.random module 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.
  • Simplified bundles:
    • Removed CJS bundle. The package is now ESM-only (dist/numpy-ts.node.cjs removed).
    • All 22 file I/O functions now available from import from 'numpy-ts' — works on Node, Bun, and Deno. numpy-ts/node is deprecated (still works as an alias).
    • 2 build outputs (down from 5) — tree-shakeable ESM + browser IIFE
  • 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
v1.1.0
2026-03-19

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, nanmax now accept axis: number[]
  • Added batched linear algebra: eig, eigh, eigvals, eigvalsh, cholesky, pinv, slogdet, matrix_norm support [..., n, n] batch inputs
  • Added unique axis parameter: find unique rows, columns, or slices along any axis
  • Added apply_along_axis ND support: now works with arrays of any dimensionality
  • Unified slice() implementation: moved from duplicated logic in NDArrayCore/NDArray to a single shapeOps.slice() function, and added sliceKeepDim() 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
v1.0.0
2026-02-20

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
Full changelog available here
v0.13.1
2026-02-17

numpy-ts v0.13.1

Final v0.x release before v1.0!
  • String repr fixes for 1.0 by @dupontcyborg in #48
Full changelog available here
v0.13.0
2026-02-16

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
Full changelog available here
v0.12.0
2025-12-22

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
Full changelog available here
v0.11.0
2025-12-17

numpy-ts v0.11.0

  • Added fancy indexing (iindex/bindex) and document NumPy divergences by @dupontcyborg in #34
  • Added complex number support (complex64, complex128) by @dupontcyborg in #35 & #36
Full changelog available here
v0.10.0
2025-12-12

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
Full changelog available here
v0.9.0
2025-12-09

numpy-ts v0.9.0

  • Implemented numpy.linalg module (19 functions) by @dupontcyborg in #24
  • Implemented exponential and gradient functions by @dupontcyborg in #25
  • Implemented rounding and set operations with full NumPy compatibility by @dupontcyborg in #26
Full changelog available here
v0.8.0
2025-12-05

numpy-ts v0.8.0

  • Added missing I/O functions by @dupontcyborg in #22
  • Implemented sorting and searching functions by @dupontcyborg in #23
Full changelog available here
v0.7.0
2025-12-03

numpy-ts v0.7.0

  • Added indexing functions to achieve 100% Indexing API coverage by @dupontcyborg in #20
  • Added bitwise operations (bitwise_and, bitwise_or, bitwise_xor, bitwise_not, invert, left_shift, right_shift, packbits, unpackbits) by @dupontcyborg in #21
Full changelog available here
v0.6.0
2025-12-02

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
Full changelog available here
v0.5.0
2025-12-01

numpy-ts v0.5.0

  • Add NPY and NPZ file format support by @dupontcyborg in #12
  • Add array manipulation and advanced functions for NumPy parity by @dupontcyborg in #13
  • Api + README cleanup by @dupontcyborg in #14
  • Trigonometric & hyperbolic functions by @dupontcyborg in #15
Full changelog available here
v0.4.0
2025-11-26

numpy-ts v0.4.0

  • Custom BLAS by @dupontcyborg in #11
Full changelog available here
v0.3.0
2025-11-25

numpy-ts v0.3.0

  • Arithmetic improvements by @dupontcyborg in #7
  • Removed stdlib ndarray and implemented our own by @dupontcyborg in #9
  • Updated README by @dupontcyborg in #10
Full changelog available here
v0.2.0
2025-10-27

numpy-ts v0.2.0

  • Remaining arithmetic by @dupontcyborg in #3
  • Improved unit test coverage by @dupontcyborg in #4
  • Potential fix for code scanning alert no. 10: Workflow does not contain permissions by @dupontcyborg in #5
  • v0.2.0 by @dupontcyborg in #6
Full changelog available here
v0.1.0
2025-10-27

numpy-ts v0.1.0

First release of numpy-ts!Full changelog available here