Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Reorganize from_iter and dispatch to collect_ca when possible #15904

Merged
merged 3 commits into from
Apr 26, 2024

Conversation

ritchie46
Copy link
Member

No description provided.

@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars labels Apr 26, 2024
@@ -901,7 +901,39 @@ impl<T: AsArray> ArrayFromIterDtype<Option<T>> for ListArray<i64> {
iter: I,
) -> Result<Self, E> {
let iter_values = iter.into_iter().collect::<Result<Vec<_>, E>>()?;
Ok(Self::arr_from_iter_with_dtype(dtype, iter_values))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expanding this one saves an extra iter() -> collect pass.

@ritchie46 ritchie46 merged commit e541e96 into main Apr 26, 2024
19 of 20 checks passed
@ritchie46 ritchie46 deleted the from_iter branch April 26, 2024 10:51
@c-peters c-peters added the accepted Ready for implementation label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants