MIT License

项目介绍

dupontcyborg/numpy-ts 是一个托管在 GitHub 上的开源项目,主要使用 TypeScript 编写,采用 MIT License 许可证,目前获得 408 个 Star、10 次 Fork。

仓库全名
dupontcyborg/numpy-ts
开源许可证
MIT License
Star 数
408
Fork 数
10
未关闭 Issue
4

README 摘要

numpy-ts src="https://raw.githubusercontent.com/dupontcyborg/numpy-ts/main/docs/images/hero-light.svg" alt="numpy-ts" /> 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 🔒…

完整内容见 GitHub 原始 README 或本页 。

常见问题

numpy-ts 用什么语言开发?

主要使用 TypeScript 编写,采用 MIT License 许可证,目前有 408 个 Star。

numpy-ts 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 numpy-ts 的源码?

可以直接克隆仓库:git clone https://github.com/dupontcyborg/numpy-ts.git,默认分支为 main;安装与运行步骤见仓库 README。

numpy-ts 最近还在维护吗?

仓库最近一次更新为 2 天前,当前有 4 个未关闭 Issue;Star 数为 408,可作为社区活跃度的参考。

关于

Fast, Complete NumPy for TypeScript & JavaScript

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
435
价值分
248
活跃状态
活跃

语言占比

TypeScript
Zig

Release

README

numpy-ts

License: MIT npm version full bundle gzipped size core import gzipped size Sponsored by Cyborg

numpy api coverage validated against NumPy 2.4

numpy-ts

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

Cyborg

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

评论

暂无评论