-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat: NDarray/Tensor support #16466
feat: NDarray/Tensor support #16466
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16466 +/- ##
==========================================
- Coverage 81.45% 81.43% -0.03%
==========================================
Files 1409 1409
Lines 184713 184946 +233
Branches 2971 2978 +7
==========================================
+ Hits 150467 150614 +147
- Misses 33726 33811 +85
- Partials 520 521 +1 ☔ View full report in Codecov by Sentry. |
@@ -510,15 +511,17 @@ def numpy_to_pyseries( | |||
strict=strict, | |||
nan_to_null=nan_to_null, | |||
) | |||
return ( |
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.
We definitely don't want to go through the engine during construction. So added reshape
directly on Series
.
@@ -500,6 +499,8 @@ def numpy_to_pyseries( | |||
return constructor( | |||
name, values, nan_to_null if dtype in (np.float32, np.float64) else strict | |||
) | |||
# TODO: remove this branch on 1.0. | |||
# This returns a List whereas we should return an Array type | |||
elif values.ndim == 2: |
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.
This branch still returns List<i64>
for 2D arrays. Will remove that during 1.0, so we return an Array
type here.
On the 1.0 release we will
Series
to read 2D arrays toArray
type instead ofList
.reshape
toArray
instead ofList
.Higher dimensions will now go to
Array
with a multidimensional shape instead ofObject
.Constructors coming