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

Function ValidateShape

cpp/src/arrow/sparse_tensor.h:180–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178 }
179
180 inline Status ValidateShape(const std::vector<int64_t>& shape) const override {
181 ARROW_RETURN_NOT_OK(SparseIndex::ValidateShape(shape));
182
183 if (static_cast<size_t>(coords_->shape()[1]) == shape.size()) {
184 return Status::OK();
185 }
186
187 return Status::Invalid(
188 "shape length is inconsistent with the coords matrix in COO index");
189 }
190
191 protected:
192 std::shared_ptr<Tensor> coords_;

Callers 1

ValidateShapeMethod · 0.85

Calls 4

OKFunction · 0.70
InvalidFunction · 0.70
shapeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected