Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ritchie46
Copy link
Member

This was actually very easy to add. We keep the numpy object alive as foreign memory owner and memory map the data.

a = np.ones(int(1e7))

# zero copy series conversion
pl.Series("a", a)

# zero copy DataFrame conversion
pl.DataFrame({
   "a": a,
   "b": a
})

@github-actions github-actions bot added performance Performance issues or improvements python Related to Python Polars labels Nov 12, 2023
@ritchie46 ritchie46 added the highlight Highlight this PR in the changelog label Nov 13, 2023
@ritchie46 ritchie46 merged commit 7711af2 into main Nov 13, 2023
@ritchie46 ritchie46 deleted the numpy branch November 13, 2023 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

highlight Highlight this PR in the changelog performance Performance issues or improvements python Related to Python Polars

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants