rok commented on code in PR #38008:
URL: https://github.com/apache/arrow/pull/38008#discussion_r1426742620
##########
python/pyarrow/types.pxi:
##########
@@ -4948,6 +5028,122 @@ def fixed_shape_tensor(DataType value_type, shape,
dim_names=None, permutation=N
return out
+def variable_shape_tensor(DataType value_type, ndim, dim_names=None,
permutation=None,
+ uniform_shape=None):
+ """
+ Create instance of variable shape tensor extension type with number of
+ dimensions and optional names of tensor dimensions and indices of the
+ desired logical ordering of dimensions.
+
+ Parameters
+ ----------
+ value_type : DataType
+ Data type of individual tensor elements.
+ ndim : integer
+ The number of dimensions of the contained tensors.
+ dim_names : tuple or list of strings, default None
+ Explicit names to tensor dimensions.
+ permutation : tuple or list integers, default None
+ Indices of the desired ordering of the original dimensions.
+ The indices contain a permutation of the values ``[0, 1, .., N-1]``
where
+ N is the number of dimensions. The permutation indicates which
dimension
+ of the logical layout corresponds to which dimension of the physical
tensor.
+ For more information on this parameter see
+ :ref:`fixed_shape_tensor_extension`.
Review Comment:
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]