| 37 | // SparseIndex |
| 38 | |
| 39 | Status 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 | |
| 47 | namespace internal { |
| 48 | namespace { |