Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions
xgboost.data::CSRArrayAdapter Class Reference

Adapter for CSR array on host, in Python that's scipy.sparse.csr_matrix. More...

#include <adapter.h>

Inheritance diagram for xgboost.data::CSRArrayAdapter:
xgboost.data::detail::SingleBatchDataIter< CSRArrayAdapterBatch > dmlc::DataIter< DType >

Public Member Functions

 CSRArrayAdapter (StringView indptr, StringView indices, StringView values, size_t num_cols)
 
CSRArrayAdapterBatch const & Value () const override
 get current data
 
size_t NumRows () const
 
size_t NumColumns () const
 
- Public Member Functions inherited from xgboost.data::detail::SingleBatchDataIter< CSRArrayAdapterBatch >
void BeforeFirst () override
 set before first of the item
 
bool Next () override
 move to next item
 

Detailed Description

Adapter for CSR array on host, in Python that's scipy.sparse.csr_matrix.

This is similar to CSRAdapter, but supports array_interface instead of raw pointers. An advantage is this can handle various data type without making a copy.

Member Function Documentation

◆ Value()

CSRArrayAdapterBatch const & xgboost.data::CSRArrayAdapter::Value ( ) const
inlineoverridevirtual

get current data

Implements dmlc::DataIter< DType >.


The documentation for this class was generated from the following file: