是否有办法访问 cython/c++ 中极性的底层结构?
我有许多脚本可以获取 np.ndarrays 并进行迭代。极地有类似的东西吗?
最佳答案
这绝对是可能的。 Polars 内存可以导出到 pyarrow 零拷贝。然后你可以使用箭头的C data interface捕获那段内存。
这是 Polars 存储库中的一个示例,其中他们使用 C 数据接口(interface)在 Rust 中再次获取该内存。 https://github.com/pola-rs/polars/tree/master/examples/python_rust_compiled_function
关于python - 是否可以在 cython 中访问 Polars 的底层数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73102526/