PyO3 / PyO3/rust-numpy

Support writing custom NumPy ufuncs in Rust

Open
#399 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
1.4k
Forks
141
Avg merge
16m
Merged PRs (30d)
3

Description

Add support for writing custom NumPy ufuncs in Rust.

Discussed in https://github.com/PyO3/rust-numpy/discussions/398

Originally posted by mhostetter October 29, 2023
Is it possible to write a custom NumPy ufunc in Rust and then apply it on arrays (with the requisite broadcasting) from either Rust or Python?

My application is writing finite field arithmetic ufuncs. I previously implemented this in Python and wrapped in Numba. I'm curious if I can replicate in Rust and achieve better performance.

Forgive the question if it's obvious. I didn't find an answer in documentation.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing Discussion 398, which contains the original question and use case. The issue names no files, tests, or entry points; completion would require defining support for custom NumPy ufuncs in Rust, including broadcasting and use from both Rust and Python.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, rust
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.