\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
| 239 | /// (if this is empty, the data assumed to be row-major) |
| 240 | /// \param[in] dim_names The names of the tensor dimensions |
| 241 | static Result<std::shared_ptr<NumericTensor<TYPE>>> Make( |
| 242 | const std::shared_ptr<Buffer>& data, const std::vector<int64_t>& shape, |
| 243 | const std::vector<int64_t>& strides = {}, |
| 244 | const std::vector<std::string>& dim_names = {}) { |
| 245 | ARROW_RETURN_NOT_OK(internal::ValidateTensorParameters( |
| 246 | TypeTraits<TYPE>::type_singleton(), data, shape, strides, dim_names)); |
| 247 | return std::make_shared<NumericTensor<TYPE>>(data, shape, strides, dim_names); |
| 248 | } |
| 249 | |
| 250 | /// Constructor with non-negative strides and dimension names |
| 251 | NumericTensor(const std::shared_ptr<Buffer>& data, const std::vector<int64_t>& shape, |
nothing calls this directly
no test coverage detected