Skip to content
Discussion options

You must be logged in to vote

@adamreichold thanks alot! You mean like this:

#[pyfunction]
fn ultimeasure(py: Python, pyobj: PyObject) -> ExprWrapper{

    let functor = move |s1: Series, s2: Series| { 
        let pyobj = pyobj.clone();
        Python::with_gil(move |py| {

        // Here I would convert Series to Python Side Series, call lambda, then result back to Rust Series like this:
        //let s1 = rust_series_to_py_series(py, &s1).unwrap();
        //let s2 = rust_series_to_py_series(py, &s2).unwrap();

        // call the lambda and get a python side Series wrapper
        //let res = match pyobj.call(py, (s1, s2), None) {
        //    Ok(pyobj) => pyobj,
        //    Err(e) => panic!("python apply fail…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@adamreichold
Comment options

@AnatolyBuga
Comment options

@adamreichold
Comment options

@AnatolyBuga
Comment options

Answer selected by AnatolyBuga
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants