| 229 | } |
| 230 | |
| 231 | Result<std::shared_ptr<Tensor>> MakeTensorFromSparseCSCMatrix( |
| 232 | MemoryPool* pool, const SparseCSCMatrix* sparse_tensor) { |
| 233 | const auto& sparse_index = |
| 234 | internal::checked_cast<const SparseCSCIndex&>(*sparse_tensor->sparse_index()); |
| 235 | const auto& indptr = sparse_index.indptr(); |
| 236 | const auto& indices = sparse_index.indices(); |
| 237 | const auto non_zero_length = sparse_tensor->non_zero_length(); |
| 238 | return MakeTensorFromSparseCSXMatrix( |
| 239 | SparseMatrixCompressedAxis::COLUMN, pool, indptr, indices, non_zero_length, |
| 240 | sparse_tensor->type(), sparse_tensor->shape(), sparse_tensor->size(), |
| 241 | sparse_tensor->raw_data(), sparse_tensor->dim_names()); |
| 242 | } |
| 243 | |
| 244 | } // namespace internal |
| 245 | } // namespace arrow |
no test coverage detected