You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "AlenkaF (via GitHub)" <gi...@apache.org> on 2023/04/05 08:27:46 UTC

[GitHub] [arrow] AlenkaF commented on a diff in pull request #34883: GH-34882: [Python] Binding for FixedShapeTensorType

AlenkaF commented on code in PR #34883:
URL: https://github.com/apache/arrow/pull/34883#discussion_r1158194346


##########
python/pyarrow/tests/test_extension_type.py:
##########
@@ -1130,13 +1131,32 @@ def test_cpp_extension_in_python(tmpdir):
 
 
 def test_tensor_type():
-    tensor_type = pa.FixedShapeTensorType(pa.int8(), (2, 3))
+    tensor_type = pa.fixed_shape_tensor(pa.int8(), [2, 3])
     assert tensor_type.extension_name == "arrow.fixed_shape_tensor"
     assert tensor_type.storage_type == pa.list_(pa.int8(), 6)
+    assert tensor_type.shape == [2, 3]
+    assert not tensor_type.dim_names
+    assert not tensor_type.permutation

Review Comment:
   I think it returns `None`, will check.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org