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.0.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.0-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.0.tar.gz.

File metadata

  • Download URL: ferrix-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 40d9862fa3eca4df94cf11ecc16c146f7a2a51e39271fe9d8351d6456eafbc6d
MD5 3d53f7a816eac2815da93d5bf343f462
BLAKE2b-256 ee369dbe71f415d9e259120dc9b86be9485b6a8e8de9619f3234bbd0bcef2589

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ferrix-0.1.0-cp314-cp314-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 3a3c623a95fe587213343b53c406f6ca619dea116c3b5be2ca73cf4501f0b66b
MD5 f82306dd140874e1dc786fc89c149be7
BLAKE2b-256 beda1f131fc525cfc3fcda1dc0565dcb709f72b8a7f19c1958ad9a1f9fd21107

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