jorisvandenbossche commented on code in PR #33925:
URL: https://github.com/apache/arrow/pull/33925#discussion_r1094376269
##########
docs/source/format/CanonicalExtensions.rst:
##########
@@ -72,4 +72,30 @@ same rules as laid out above, and provide backwards
compatibility guarantees.
Official List
=============
-No canonical extension types have been standardized yet.
+Fixed shape tensor
+==================
+
+* Extension name: `arrow.fixed_shape_tensor`.
+
+* The storage type of the extension: ``FixedSizeList`` where:
+
+ * **value_type** is the data type of individual tensors and
+ is an instance of ``pyarrow.DataType`` or ``pyarrow.Field``.
+ * **list_size** is the product of all the elements in tensor shape.
+
+* Extension type parameters:
+
+ * **value_type** = Arrow DataType of the tensor elements
+ * **shape** = shape of the contained tensors as a tuple
+ * **is_row_major** = boolean indicating the order of elements
Review Comment:
I think for this spec, the "physical" contiguity is a given, because that's
the only possibility that it would match with our memory layout for
FixedSizeList (or any other type, for that matter).
But I do think we _also_ can say that the data should be interpreted as
row-major ("logical" contiguity). At least, that's what we would use by default
when converting to/from arrays (it's of course open for discussion if we should
do that, but to be more explicit: that's what the current (example)
implementations do), and applications could still ignore that and interpret the
data however they want.
--
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]