MCPcopy Create free account
hub / github.com/apache/arrow / SparseTensor

Method SparseTensor

cpp/src/arrow/sparse_tensor.cc:428–439  ·  view source on GitHub ↗

Constructor with all attributes

Source from the content-addressed store, hash-verified

426
427// Constructor with all attributes
428SparseTensor::SparseTensor(const std::shared_ptr<DataType>& type,
429 const std::shared_ptr<Buffer>& data,
430 const std::vector<int64_t>& shape,
431 const std::shared_ptr<SparseIndex>& sparse_index,
432 const std::vector<std::string>& dim_names)
433 : type_(type),
434 data_(data),
435 shape_(shape),
436 sparse_index_(sparse_index),
437 dim_names_(dim_names) {
438 ARROW_CHECK(is_tensor_supported(type->id()));
439}
440
441const std::string& SparseTensor::dim_name(int i) const {
442 static const std::string kEmpty = "";

Callers

nothing calls this directly

Calls 2

is_tensor_supportedFunction · 0.85
idMethod · 0.45

Tested by

no test coverage detected