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


##########
cpp/src/arrow/array/array_base.h:
##########
@@ -246,6 +248,15 @@ class ARROW_EXPORT Array {
   /// \return const std::shared_ptr<ArrayStatistics>&
   const std::shared_ptr<ArrayStatistics>& statistics() const { return 
data_->statistics; }
 
+  /// \brief Create a Tensor from this Array
+  ///
+  /// When the data can reasonably be understood as a multidimensional numeric 
Tensor,
+  /// return the data as such.
+  /// Examples include NumericArray, FixedShapeTensorArray, nested 
FixedSizeListArray.
+  /// Nulls are ignored, leaving the output tensor with unspecified values 
where this
+  /// array has null entries.
+  virtual Result<std::shared_ptr<Tensor>> ToTensor() const;

Review Comment:
   Ok, and I see we also have `Table::ToTensor`. So perhaps that ship has 
already sailed...



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