Skip to main content

A fast tensor library in Rust

Project description

ferrix

A fast, memory-safe tensor library in Rust — exposed as a Python package.

Install

pip install ferrix

Usage

import ferrix

a = ferrix.PyNDArray([1.0,2.0,3.0,4.0], [2,2])
b = ferrix.PyNDArray([5.0,6.0,7.0,8.0], [2,2])

c = a.matmul_blas(b)
print(c.get([0,0]))  # 19.0

print(a.relu().get([0,0]))
print(a.softmax().sum())  # 1.0

Benchmarks

Operation ferrix NumPy
matmul 512×512 (BLAS) 6.5ms 2.1ms
relu 1M elements 0.52ms 0.76ms

Features

  • N-dimensional arrays with stride-based indexing
  • Zero-copy slicing, reshape, transpose
  • Element-wise ops: add, mul, scale, relu, sigmoid, softmax
  • Matrix multiply via OpenBLAS FFI
  • Parallel ops via rayon
  • Boolean masking, fancy indexing, gather

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ferrix-0.1.1.tar.gz (47.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ferrix-0.1.1-cp314-cp314-manylinux_2_38_x86_64.whl (14.7 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.38+ x86-64

File details

Details for the file ferrix-0.1.1.tar.gz.

File metadata

  • Download URL: ferrix-0.1.1.tar.gz
  • Upload date:
  • Size: 47.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.6

File hashes

Hashes for ferrix-0.1.1.tar.gz
Algorithm Hash digest
SHA256 975732c38ee901056ca3391e8085fe652f31b19dd12ebe745c9f7fce95e416f9
MD5 ab8af9e91a9795d3528ba967aaa67858
BLAKE2b-256 694546f6e8fdce5e913b6794d65502f9ba02e6a9cc6ecb3c8819711cf7e505db

See more details on using hashes here.

File details

Details for the file ferrix-0.1.1-cp314-cp314-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for ferrix-0.1.1-cp314-cp314-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 55d83472381fb0dced1e6930d659a45b916d9b3eb589186f4abb145434e73e2a
MD5 4dd225401aa305b7db18561ddad47f2e
BLAKE2b-256 204365550802ab40343bb5ebffe2884347959691cedd223d8c534ac83d290ae6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page