GH-40348: [Python] Add Python wrapper for VariableShapeTensor#40354
GH-40348: [Python] Add Python wrapper for VariableShapeTensor#40354rok wants to merge 1 commit intoapache:mainfrom
Conversation
AlenkaF
left a comment
There was a problem hiding this comment.
Small nits =) Thank you for working on this, takes lots of work!
b6b63a6 to
a372fe6
Compare
|
The failures are connected. |
fab047e to
f58c973
Compare
5197532 to
55cc40b
Compare
9b0f2b6 to
7f84762
Compare
4429dd2 to
b4cb6cd
Compare
| internal::Permute<int64_t>(permutation, &shape); | ||
| ARROW_ASSIGN_OR_RAISE( | ||
| auto strides, internal::ComputeStrides(ext_type.value_type(), shape, permutation)); | ||
| internal::Permute<int64_t>(permutation, &shape); | ||
|
|
There was a problem hiding this comment.
I'm thinking thinking about this still. It's probably a bug or a different interpretation at least.
0df8139 to
d5a548d
Compare
Add PyArrow bindings for the VariableShapeTensor extension type, including VariableShapeTensorType, VariableShapeTensorArray, and VariableShapeTensorScalar with support for converting to/from NumPy tensors.
|
@AlenkaF could you do a quick pass on this? I'm a little unsure about the |
|
@rok sure! Will have a look later today. |
|
I did a very quick look at the code now. I would suggest splitting this PR into two as there is quite a lot of lines added and there might be even something that can be moved out. Moving the |
Rationale for this change
Once C++ implementation of VariableShapeTensor is complete (#38007) we want a Python wrapper for
VariableShapeTensor.What changes are included in this PR?
This adds a Python wrapper for
VariableShapeTensor.Are these changes tested?
This adds appropriate Python tests.
Are there any user-facing changes?
Yes, a new extension and array type are exposed.