Complete NumPy for TypeScript
The most comprehensive NumPy implementation for TypeScript and JavaScript. Write numerical computing code with the same API you already know from Python — fully type-safe, tree-shakeable, and validated against NumPy itself.- npm
- yarn
- pnpm
Why numpy-ts?
94% API Coverage
476 of 507 NumPy functions implemented. From basic arithmetic to FFT, linear algebra, random distributions, and beyond.
Type-Safe
Full TypeScript type definitions for every function, dtype, and array operation. Catch errors at compile time, not runtime.
Tree-Shakeable
Import only what you need. Bundlers eliminate unused code automatically, keeping your production builds small.
NumPy-Validated
Over 6,000 tests compare outputs directly against NumPy. If NumPy produces a result, numpy-ts matches it.
Zero Dependencies
No native modules, no WebAssembly, no heavy runtimes. Pure TypeScript that runs everywhere JavaScript runs.
Universal Runtime
Works in Node.js, Bun, Deno, and all modern browsers. One library for server and client.
Quick Example
Get Started
Quickstart
Install numpy-ts and write your first array operations in under 5 minutes.
API Reference
Browse all 476 implemented functions with signatures, parameters, and examples.
Examples
Real-world examples covering linear algebra, signal processing, statistics, and more.
Playground
Write and run numpy-ts code directly in your browser with instant feedback.
Coming from NumPy?
numpy-ts mirrors the NumPy API as closely as possible. Most code translates directly:- Python (NumPy)
- TypeScript (numpy-ts)