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.2.tar.gz (41.1 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.2-cp314-cp314-manylinux_2_34_x86_64.whl (305.3 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

File details

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

File metadata

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

File hashes

Hashes for ferrix-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0384bf4b31b1f88c6368f4ba264545b1c2d154a5a7bb12303358b3215ed40b55
MD5 1d9d7a2b069d5de6d8a75acd2e6385e7
BLAKE2b-256 d9065827b22a4ae8ee67a0b7327a6d32505477f0df207b657c3c1e2fd888d9c6

See more details on using hashes here.

File details

Details for the file ferrix-0.1.2-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for ferrix-0.1.2-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 df4a36875219962ec1611371178e0bca9c214ce9aecace24ba5c80a1de7e1f45
MD5 5d4bb97a5d229dba3831094a2fd5fca3
BLAKE2b-256 609a93a7b33e64a76112eaffe5ca6ef849d1efaf75fb1dcccbdbe63ef38ec7f1

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