-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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(python): Clean up some of the AnyValue conversion logic #15190
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15190 +/- ##
==========================================
+ Coverage 81.22% 81.23% +0.01%
==========================================
Files 1348 1348
Lines 175330 175304 -26
Branches 2508 2509 +1
==========================================
+ Hits 142409 142412 +3
+ Misses 32442 32411 -31
- Partials 479 481 +2 ☔ View full report in Codecov by Sentry. |
# Special case for Array as it needs to pass the dtype argument on construction | ||
if isinstance(dtype, dt.Array): | ||
return functools.partial(PySeries.new_array, dtype=dtype) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: Constructing a Series with an uninstantiated pl.Array
was and is still broken:
import polars as pl
s = pl.Series([[1, 2], [3, 4]], dtype=pl.Array)
print(s)
# ValueError: cannot construct PySeries for type Array
Mostly a lot of refactoring, but also addressed some minor issues.