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

Adapter for dense array on host, in Python that's numpy.ndarray. More...

#include <adapter.h>

Inheritance diagram for xgboost.data::ArrayAdapter:
xgboost.data::detail::SingleBatchDataIter< ArrayAdapterBatch > dmlc::DataIter< DType >

Public Member Functions

 ArrayAdapter (StringView array_interface)
 
ArrayAdapterBatch const & Value () const override
 get current data
 
std::size_t NumRows () const
 
std::size_t NumColumns () const
 
- Public Member Functions inherited from xgboost.data::detail::SingleBatchDataIter< ArrayAdapterBatch >
void BeforeFirst () override
 set before first of the item
 
bool Next () override
 move to next item
 

Detailed Description

Adapter for dense array on host, in Python that's numpy.ndarray.

This is similar to DenseAdapter, 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()

ArrayAdapterBatch const & xgboost.data::ArrayAdapter::Value ( ) const
inlineoverridevirtual

get current data

Implements dmlc::DataIter< DType >.


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