|
|
|
|
|
by peepeepoopoo3
1260 days ago
|
|
I hate pandas with a burning passion, but one thing it does have going for it is (some) interoperability with numpy, which opens up the rest of the scipy ecosystem. How easy is it to get numpy arrays into and out of polars? |
|
`pl.from_numpy` and `series.to_numpy` are your friend here. For 1D columns, we often can be zero copy as well.
Besides that we support numpy ufuncs for `Series` and `Expressions`. As OP pointed out:
https://kevinheavey.github.io/modern-polars/performance.html...
Numpy can be used to speed up some functions by utilizing numpy ufuncs. Numpy drops the GIL and therefore they can still be executed in parallel.