百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
N

numpy-ts

> 编程语言
开源

快速、完整的 NumPy 版本用于 TypeScript 和 JavaScript

379 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

快速、完整的 NumPy 版本用于 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

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

Quick Start

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 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScriptjavascriptndarraynumpynumpy-arrays

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

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