-
Notifications
You must be signed in to change notification settings - Fork 123
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] [Tensor] Add support for Tensor
and FixedShapeTensor
types.
#1073
Conversation
209775d
to
bbc9eca
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1073 +/- ##
==========================================
+ Coverage 88.39% 88.42% +0.03%
==========================================
Files 54 54
Lines 5488 5555 +67
==========================================
+ Hits 4851 4912 +61
- Misses 637 643 +6
|
53d67b6
to
e6b8388
Compare
56a72e3
to
0e889ad
Compare
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.
LGTM! I'm looking forward to factoring our Monolithic casting logic when we get a chance
type ArrayPayload<Tgt> = (Vec<Tgt>, Option<Vec<i64>>, Option<Vec<Vec<u64>>>); | ||
type ArrayPayload<Tgt> = ( | ||
Vec<Tgt>, | ||
Option<Vec<i64>>, |
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.
should these match?
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.
Hmm what do you mean by "match", and to what are you referring to by "these"? The first two fields are the data array and the corresponding offsets array, where the former has a native templated type and the latter should always have an i64
type.
The last two fields are the shape array and the corresponding offsets array.
bae6f8b
to
765bc53
Compare
This PR adds basic support for
Tensor
andFixedShapeTensor
types, allowing us to represent arbitrary n-dimensional arrays in dataframe columns.Heterogeneous/ragged tensor type
Homogeneous/fixed-shape tensor type
TODOs
Tensor
type on Python ingress (Series.from_pylist()
).Tensor
type to NumPy ndarrays on Python egress (Series.to_pylist()
).fixed_shape_tensor
extension type toFixedShapeTensor
type on Arrow ingress.FixedShapeTensor
type to pyarrowfixed_shape_tensor
extension type on Arrow egress.ndarray
crate.