Documentation ¶
Overview ¶
Package rnpy handles conversions between ROOT and NumPy arrays.
Index ¶
- type Column
- type Record
- func (rec *Record) Column(i int) array.Interface
- func (rec *Record) ColumnName(i int) string
- func (rec *Record) Columns() []array.Interface
- func (rec *Record) NewSlice(i, j int64) array.Record
- func (rec *Record) NumCols() int64
- func (rec *Record) NumRows() int64
- func (rec *Record) Release()
- func (rec *Record) Retain()
- func (rec *Record) Schema() *arrow.Schema
- type RecordReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Column ¶
type Column struct {
// contains filtered or unexported fields
}
Column provides a NumPy representation of a Branch or Leaf.
func NewColumn ¶
NewColumn returns the column with the provided name and tree.
NewColumn returns an error if no branch or leaf could be found. NewColumn returns an error if the branch or leaf is of an unsupported type.
func NewColumns ¶
NewColumns returns all the ReadVars of the provided Tree as a slice of Columns.
ReadVars that can not be represented as NumPy arrays are silently discarded.
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
Record is an in-memory Arrow Record backed by a NumPy data file.
func (*Record) ColumnName ¶
func (*Record) NewSlice ¶
NewSlice constructs a zero-copy slice of the record with the indicated indices i and j, corresponding to array[i:j]. The returned record must be Release()'d after use.
NewSlice panics if the slice is outside the valid range of the record array. NewSlice panics if j < i.
func (*Record) Release ¶
func (rec *Record) Release()
Release decreases the reference count by 1. When the reference count goes to zero, the memory is freed. Release may be called simultaneously from multiple goroutines.
type RecordReader ¶
type RecordReader struct {
// contains filtered or unexported fields
}
func NewRecordReader ¶
func NewRecordReader(recs ...array.Record) *RecordReader