Skip to content

Commit

Permalink
Post rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
rok committed Oct 11, 2023
1 parent dabef5d commit 6287402
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
23 changes: 0 additions & 23 deletions docs/source/format/CanonicalExtensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,21 +206,6 @@ Variable shape tensor
This allows for interpreting the tensor correctly without accounting for
uniform dimensions while still permitting optional optimizations that
take advantage of the uniformity.
* **uniform_dimensions** = indices of dimensions whose sizes are
guaranteed to remain constant. Indices are a subset of all possible
dimension indices ([0, 1, .., N-1]).
The uniform dimensions must still be represented in the `shape` field,
and must always be the same value for all tensors in the array -- this
allows code to interpret the tensor correctly without accounting for
uniform dimensions while still permitting optional optimizations that
take advantage of the uniformity. uniform_dimensions can be left out,
in which case it is assumed that all dimensions might be variable.

* **uniform_shape** = shape of the dimensions that are guaranteed to stay
constant over all tensors in the array, with the shape of the ragged dimensions
set to 0.
An array containing tensor with shape (2, 3, 4) and uniform dimensions
(0, 2) would have uniform shape (2, 0, 4).

* Description of the serialization:

Expand All @@ -242,11 +227,6 @@ Variable shape tensor

``{ "dim_names": ["H", "W", "C"], "uniform_shape": [400, null, 3] }``

- Example with ``uniform_dimensions`` metadata for a set of color images
with variable width:

``{ "dim_names": ["H", "W", "C"], "uniform_dimensions": [1] }``

- Example of permuted 3-dimensional tensor:

``{ "permutation": [2, 0, 1] }``
Expand All @@ -271,9 +251,6 @@ Variable shape tensor
Values inside each **data** tensor element are stored in row-major/C-contiguous
order according to the corresponding **shape**.

Elements in a variable shape tensor extension array are stored
in row-major/C-contiguous order.

=========================
Community Extension Types
=========================
Expand Down
2 changes: 1 addition & 1 deletion python/pyarrow/tests/test_extension_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ def test_tensor_type_is_picklable(pickle_module):
'fixed_shape_tensor[value_type=int64, shape=[2,2,3], dim_names=[C,H,W]]'
)
])
def test_tensor_type_str(tensor_type, text):
def test_tensor_type_str(tensor_type, text, pickle_module):
tensor_type_str = tensor_type.__str__()
assert text in tensor_type_str

Expand Down

0 comments on commit 6287402

Please sign in to comment.