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

Method ValidateShape

cpp/src/arrow/sparse_tensor.cc:39–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37// SparseIndex
38
39Status SparseIndex::ValidateShape(const std::vector<int64_t>& shape) const {
40 if (!std::all_of(shape.begin(), shape.end(), [](int64_t x) { return x >= 0; })) {
41 return Status::Invalid("Shape elements must be positive");
42 }
43
44 return Status::OK();
45}
46
47namespace internal {
48namespace {

Callers

nothing calls this directly

Calls 4

InvalidFunction · 0.70
OKFunction · 0.70
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected