Skip to content

Feature Request: convert external pointer to capsule with r_to_py #660

@Marlin-Na

Description

@Marlin-Na

I hope to have the functionality to pass an R's external pointer object to python, possibly by converting it into a capsule object. So that

  1. the pointer and the underlying data are shared between R and python.
  2. R's external pointer object won't be freed while python is still pointing to it.

It would be similar to how memory are shared between numpy array and R's array.

If you think this idea is reasonable, I can try to implement it and submit a PR when I have time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions