As a learning exercise I'm trying to implement a parameterised decorator function in pyo3 using closures. The pyo3 documentation contains an example o ...
As a learning exercise I'm trying to implement a parameterised decorator function in pyo3 using closures. The pyo3 documentation contains an example o ...
I have a struct in Rust that works like a linked-list that I want to expose to Python. The struct has a parent field, which is a reference to a parent ...
I'm using Py03 to build a python module in Rust. I have a class in Rust which accepts a PyAny to refer to an object in Python. As part of the hash fun ...
I am trying to implement method which uses Pyo3 loads numpy array. use ndarray::{array, ArrayView, Ix2}; use numpy::PyArray2; use pyo3::types::IntoPy ...
Pylint will not recognize any of the functions from a PyModule that I created using PyO3 and maturin. All of the functions import and run fine in the ...
I want to write part of a python module in rust (with PYo3) but also partly in python, so something like... src/utils.rs: use pyo3::prelude::*; #[p ...
I am new to rust. I want to write a function which later can be imported into Python as a module using the pyo3 crate. Below is the Python implementa ...
I'm using pyo3 to add some rust to my python project (for performance), and wanted to create a function to make adding submodules easier. My current c ...
I implemented an algorithm in rust for speed, which is then built into a python module. Running the function is indeed much faster than the python imp ...
I'm new to pyo3 and a beginner in Rust. What I'm trying to do is to return from Rust slice to Python bytes. I read both about the type conversion and ...
I have the following example: use pyo3::prelude::*; use std::collections::{HashMap, HashSet}; use std::sync::RwLock; #[pyclass] struct Rustex { ...
I'm working on a rust/python package using PyO3 and its working great from python after I run maturin develop. I can import my rust code into Python a ...
I have created a custom module in rust and converted it to a python module using PyO3 binding. It works on a local machine using the hardcoded route, ...
I have a method foo with the following signature: In my test I'm trying to create a test array to feed into foo Unfortunately, rust tells me: ...
I have defined a few structs in my code and if a certain feature is enabled on the crate, I would like to generate Python bindings for those structs a ...
I'm very, very new to Rust and struggling with it because of my strong weakly typed programming background. The code below should write data being re ...
I'm writing my first Rust-based Python module, and it kills the Python process on import. I've got it down to a pretty minimal example, based loosely ...
I am using Pyo3 to call Rust functions from Python and vice versa. I am trying to achieve the following: Python calls rust_function_1 Rust fun ...
I want to wrap a function that takes an one-dimensional NDArray (rust-numpy) and an usize as parameters, and returns a one-dimensional array using PyO ...
Is this possible? After some research, it seems that the library setuptools-rust can be used for easy distribution, but it looks like the user also ne ...