AntoinePrv commented on code in PR #50929:
URL: https://github.com/apache/arrow/pull/50929#discussion_r3922093186


##########
python/pyarrow/array.pxi:
##########
@@ -4960,19 +4985,21 @@ cdef class FixedShapeTensorArray(ExtensionArray):
 
         The conversion is zero-copy.
 
+        Parameters
+        ----------
+        allow_nulls : bool, default `False`
+            When true, nulls are ignored, leaving the output tensor with
+            unspecified values where this array has null entries.
+            When false, nulls are rejected.
+
         Returns
         -------
         pyarrow.Tensor
             Tensor representing tensors in the fixed shape tensor array 
concatenated
             along the first dimension.
         """
 
-        cdef:
-            CFixedShapeTensorArray* ext_array = 
<CFixedShapeTensorArray*>(self.ap)
-            CResult[shared_ptr[CTensor]] ctensor
-        with nogil:
-            ctensor = ext_array.ToTensor()
-        return pyarrow_wrap_tensor(GetResultValue(ctensor))
+        return Array.to_tensor(self, allow_nulls=allow_nulls)

Review Comment:
   Yes we can, that is a leftover from before.



-- 
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]

Reply via email to