rok commented on code in PR #37533:
URL: https://github.com/apache/arrow/pull/37533#discussion_r1424683626


##########
cpp/src/arrow/extension/fixed_shape_tensor.h:
##########
@@ -43,6 +43,14 @@ class ARROW_EXPORT FixedShapeTensorArray : public 
ExtensionArray {
   /// dimensions as the FixedShapeTensorType's shape. Shape and dim_names will 
be
   /// permuted according to permutation stored in the FixedShapeTensorType 
metadata.
   const Result<std::shared_ptr<Tensor>> ToTensor() const;
+
+  /// \brief Get i-th Tensor from FixedShapeTensorArray
+  ///
+  /// This method will return a Tensor from FixedShapeTensorArray with strides
+  /// derived from shape and permutation of FixedShapeTensorArray. Shape and
+  /// dim_names will be permuted according to permutation stored in the
+  /// FixedShapeTensorArray metadata.
+  const Result<std::shared_ptr<Tensor>> GetTensor(const int64_t i) const;

Review Comment:
   Perhaps it's redundant indeed. Removed here (FSTArray) and in Python API 
(from FSTArray). Now only `GetTensor(scalar)` is available (for both c++ and 
Python).



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