Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
N

numpy-ts

> 编程语言
Open source

Fast, Complete NumPy for TypeScript & JavaScript

379 stars0 likes0 views
WebsiteGitHub

About

Fast, Complete NumPy for TypeScript & JavaScript

numpy-ts

-631%20kB-blue) -17%20kB-blue)

Complete NumPy implementation for TypeScript and JavaScript.

  • ** Extensive API** — 476 of 507 NumPy functions (93.9% coverage)
  • ‍♂️ Fast — 1.36x faster than NumPy on average across 10,500 benchmarks, thanks to Zig-WASM SIMD kernels
  • ✅ NumPy-validated — 20,000+ tests compared against Python NumPy
  • ** Type-safe** — Full TypeScript type definitions
  • ** Tree-shakeable** — Import only what you use (np.add() -> ~10kB bundle)
  • ** Universal** — Zero dependencies, works in Node.js, Deno, Bun and browsers

Docs • Playground • Examples • Coverage • Benchmarks

Install

bash
npm install numpy-ts
# or: pnpm add numpy-ts · yarn add numpy-ts · bun add numpy-ts · deno add npm:numpy-ts

Quick Start

typescript
import * as np from 'numpy-ts';

// Array creation with dtype support
const A = np.array([[1, 2], [3, 4]], 'float32');
const B = np.ones([2, 2], 'int32');

// Broadcasting and chained operations
const result = A.add(5).multiply(2);

// Linear algebra
const C = A.matmul(B);
const trace = A.trace();

// Reductions with axis support
const colMeans = A.mean(0);  // [2.0, 3.0]

// NumPy-style slicing with strings
const row = A.slice('0', ':');    // A[0, :]
const submatrix = A.slice('0:2', '1:');  // A[0:2, 1:]

Sponsors

numpy-ts is brought to you by

Interested in supporting numpy-ts? Become a sponsor.

Contributing

Issues and PRs are welcome: https://github.com/dupontcyborg/numpy-ts

AI Disclosure

See our AI disclosure for details on how AI was used in building numpy-ts.

License

MIT © Nicolas Dupont

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptjavascriptndarraynumpynumpy-arrays

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言