\brief Create a NumericTensor with full parameters This factory function will return Status::Invalid when the parameters are inconsistent \param[in] data The buffer of the tensor content \param[in] shape The shape of the tensor \param[in] strides The strides of the tensor (if this is empty, the data assumed to be row-major) \param[in] dim_names The names of the tensor dimensions
| 219 | /// (if this is empty, the data assumed to be row-major) |
| 220 | /// \param[in] dim_names The names of the tensor dimensions |
| 221 | static Result<std::shared_ptr<NumericTensor<TYPE>>> Make( |
| 222 | const std::shared_ptr<Buffer>& data, const std::vector<int64_t>& shape, |
| 223 | const std::vector<int64_t>& strides = {}, |
| 224 | const std::vector<std::string>& dim_names = {}) { |
| 225 | ARROW_RETURN_NOT_OK(internal::ValidateTensorParameters( |
| 226 | TypeTraits<TYPE>::type_singleton(), data, shape, strides, dim_names)); |
| 227 | return std::make_shared<NumericTensor<TYPE>>(data, shape, strides, dim_names); |
| 228 | } |
| 229 | |
| 230 | /// Constructor with non-negative strides and dimension names |
| 231 | NumericTensor(const std::shared_ptr<Buffer>& data, const std::vector<int64_t>& shape, |
nothing calls this directly
no test coverage detected