arrow: github.com/apache/arrow/go/arrow/tensor Index | Files

package tensor

import "github.com/apache/arrow/go/arrow/tensor"

Package tensor provides types that implement n-dimensional arrays.

Index

Package Files

numeric.gen.go tensor.go

type Float32 Uses

type Float32 struct {
    // contains filtered or unexported fields
}

Float32 is an n-dim array of float32s.

func NewFloat32 Uses

func NewFloat32(data *array.Data, shape, strides []int64, names []string) *Float32

NewFloat32 returns a new n-dimensional array of float32s. If strides is nil, row-major strides will be inferred. If names is nil, a slice of empty strings will be created.

func (*Float32) Data Uses

func (tb *Float32) Data() *array.Data

func (*Float32) DataType Uses

func (tb *Float32) DataType() arrow.DataType

func (*Float32) DimName Uses

func (tb *Float32) DimName(i int) string

func (*Float32) DimNames Uses

func (tb *Float32) DimNames() []string

func (*Float32) Float32Values Uses

func (tsr *Float32) Float32Values() []float32

func (*Float32) IsColMajor Uses

func (tb *Float32) IsColMajor() bool

func (*Float32) IsContiguous Uses

func (tb *Float32) IsContiguous() bool

func (*Float32) IsMutable Uses

func (tb *Float32) IsMutable() bool

IsMutable returns whether the underlying data buffer is mutable.

func (*Float32) IsRowMajor Uses

func (tb *Float32) IsRowMajor() bool

func (*Float32) Len Uses

func (tb *Float32) Len() int

func (*Float32) NumDims Uses

func (tb *Float32) NumDims() int

func (*Float32) Release Uses

func (tb *Float32) Release()

Release decreases the reference count by 1. Release may be called simultaneously from multiple goroutines. When the reference count goes to zero, the memory is freed.

func (*Float32) Retain Uses

func (tb *Float32) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Float32) Shape Uses

func (tb *Float32) Shape() []int64

func (*Float32) Strides Uses

func (tb *Float32) Strides() []int64

func (*Float32) Value Uses

func (tsr *Float32) Value(i []int64) float32

type Float64 Uses

type Float64 struct {
    // contains filtered or unexported fields
}

Float64 is an n-dim array of float64s.

func NewFloat64 Uses

func NewFloat64(data *array.Data, shape, strides []int64, names []string) *Float64

NewFloat64 returns a new n-dimensional array of float64s. If strides is nil, row-major strides will be inferred. If names is nil, a slice of empty strings will be created.

func (*Float64) Data Uses

func (tb *Float64) Data() *array.Data

func (*Float64) DataType Uses

func (tb *Float64) DataType() arrow.DataType

func (*Float64) DimName Uses

func (tb *Float64) DimName(i int) string

func (*Float64) DimNames Uses

func (tb *Float64) DimNames() []string

func (*Float64) Float64Values Uses

func (tsr *Float64) Float64Values() []float64

func (*Float64) IsColMajor Uses

func (tb *Float64) IsColMajor() bool

func (*Float64) IsContiguous Uses

func (tb *Float64) IsContiguous() bool

func (*Float64) IsMutable Uses

func (tb *Float64) IsMutable() bool

IsMutable returns whether the underlying data buffer is mutable.

func (*Float64) IsRowMajor Uses

func (tb *Float64) IsRowMajor() bool

func (*Float64) Len Uses

func (tb *Float64) Len() int

func (*Float64) NumDims Uses

func (tb *Float64) NumDims() int

func (*Float64) Release Uses

func (tb *Float64) Release()

Release decreases the reference count by 1. Release may be called simultaneously from multiple goroutines. When the reference count goes to zero, the memory is freed.

func (*Float64) Retain Uses

func (tb *Float64) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Float64) Shape Uses

func (tb *Float64) Shape() []int64

func (*Float64) Strides Uses

func (tb *Float64) Strides() []int64

func (*Float64) Value Uses

func (tsr *Float64) Value(i []int64) float64

type Int16 Uses

type Int16 struct {
    // contains filtered or unexported fields
}

Int16 is an n-dim array of int16s.

func NewInt16 Uses

func NewInt16(data *array.Data, shape, strides []int64, names []string) *Int16

NewInt16 returns a new n-dimensional array of int16s. If strides is nil, row-major strides will be inferred. If names is nil, a slice of empty strings will be created.

func (*Int16) Data Uses

func (tb *Int16) Data() *array.Data

func (*Int16) DataType Uses

func (tb *Int16) DataType() arrow.DataType

func (*Int16) DimName Uses

func (tb *Int16) DimName(i int) string

func (*Int16) DimNames Uses

func (tb *Int16) DimNames() []string

func (*Int16) Int16Values Uses

func (tsr *Int16) Int16Values() []int16

func (*Int16) IsColMajor Uses

func (tb *Int16) IsColMajor() bool

func (*Int16) IsContiguous Uses

func (tb *Int16) IsContiguous() bool

func (*Int16) IsMutable Uses

func (tb *Int16) IsMutable() bool

IsMutable returns whether the underlying data buffer is mutable.

func (*Int16) IsRowMajor Uses

func (tb *Int16) IsRowMajor() bool

func (*Int16) Len Uses

func (tb *Int16) Len() int

func (*Int16) NumDims Uses

func (tb *Int16) NumDims() int

func (*Int16) Release Uses

func (tb *Int16) Release()

Release decreases the reference count by 1. Release may be called simultaneously from multiple goroutines. When the reference count goes to zero, the memory is freed.

func (*Int16) Retain Uses

func (tb *Int16) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Int16) Shape Uses

func (tb *Int16) Shape() []int64

func (*Int16) Strides Uses

func (tb *Int16) Strides() []int64

func (*Int16) Value Uses

func (tsr *Int16) Value(i []int64) int16

type Int32 Uses

type Int32 struct {
    // contains filtered or unexported fields
}

Int32 is an n-dim array of int32s.

func NewInt32 Uses

func NewInt32(data *array.Data, shape, strides []int64, names []string) *Int32

NewInt32 returns a new n-dimensional array of int32s. If strides is nil, row-major strides will be inferred. If names is nil, a slice of empty strings will be created.

func (*Int32) Data Uses

func (tb *Int32) Data() *array.Data

func (*Int32) DataType Uses

func (tb *Int32) DataType() arrow.DataType

func (*Int32) DimName Uses

func (tb *Int32) DimName(i int) string

func (*Int32) DimNames Uses

func (tb *Int32) DimNames() []string

func (*Int32) Int32Values Uses

func (tsr *Int32) Int32Values() []int32

func (*Int32) IsColMajor Uses

func (tb *Int32) IsColMajor() bool

func (*Int32) IsContiguous Uses

func (tb *Int32) IsContiguous() bool

func (*Int32) IsMutable Uses

func (tb *Int32) IsMutable() bool

IsMutable returns whether the underlying data buffer is mutable.

func (*Int32) IsRowMajor Uses

func (tb *Int32) IsRowMajor() bool

func (*Int32) Len Uses

func (tb *Int32) Len() int

func (*Int32) NumDims Uses

func (tb *Int32) NumDims() int

func (*Int32) Release Uses

func (tb *Int32) Release()

Release decreases the reference count by 1. Release may be called simultaneously from multiple goroutines. When the reference count goes to zero, the memory is freed.

func (*Int32) Retain Uses

func (tb *Int32) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Int32) Shape Uses

func (tb *Int32) Shape() []int64

func (*Int32) Strides Uses

func (tb *Int32) Strides() []int64

func (*Int32) Value Uses

func (tsr *Int32) Value(i []int64) int32

type Int64 Uses

type Int64 struct {
    // contains filtered or unexported fields
}

Int64 is an n-dim array of int64s.

func NewInt64 Uses

func NewInt64(data *array.Data, shape, strides []int64, names []string) *Int64

NewInt64 returns a new n-dimensional array of int64s. If strides is nil, row-major strides will be inferred. If names is nil, a slice of empty strings will be created.

func (*Int64) Data Uses

func (tb *Int64) Data() *array.Data

func (*Int64) DataType Uses

func (tb *Int64) DataType() arrow.DataType

func (*Int64) DimName Uses

func (tb *Int64) DimName(i int) string

func (*Int64) DimNames Uses

func (tb *Int64) DimNames() []string

func (*Int64) Int64Values Uses

func (tsr *Int64) Int64Values() []int64

func (*Int64) IsColMajor Uses

func (tb *Int64) IsColMajor() bool

func (*Int64) IsContiguous Uses

func (tb *Int64) IsContiguous() bool

func (*Int64) IsMutable Uses

func (tb *Int64) IsMutable() bool

IsMutable returns whether the underlying data buffer is mutable.

func (*Int64) IsRowMajor Uses

func (tb *Int64) IsRowMajor() bool

func (*Int64) Len Uses

func (tb *Int64) Len() int

func (*Int64) NumDims Uses

func (tb *Int64) NumDims() int

func (*Int64) Release Uses

func (tb *Int64) Release()

Release decreases the reference count by 1. Release may be called simultaneously from multiple goroutines. When the reference count goes to zero, the memory is freed.

func (*Int64) Retain Uses

func (tb *Int64) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Int64) Shape Uses

func (tb *Int64) Shape() []int64

func (*Int64) Strides Uses

func (tb *Int64) Strides() []int64

func (*Int64) Value Uses

func (tsr *Int64) Value(i []int64) int64

type Int8 Uses

type Int8 struct {
    // contains filtered or unexported fields
}

Int8 is an n-dim array of int8s.

func NewInt8 Uses

func NewInt8(data *array.Data, shape, strides []int64, names []string) *Int8

NewInt8 returns a new n-dimensional array of int8s. If strides is nil, row-major strides will be inferred. If names is nil, a slice of empty strings will be created.

func (*Int8) Data Uses

func (tb *Int8) Data() *array.Data

func (*Int8) DataType Uses

func (tb *Int8) DataType() arrow.DataType

func (*Int8) DimName Uses

func (tb *Int8) DimName(i int) string

func (*Int8) DimNames Uses

func (tb *Int8) DimNames() []string

func (*Int8) Int8Values Uses

func (tsr *Int8) Int8Values() []int8

func (*Int8) IsColMajor Uses

func (tb *Int8) IsColMajor() bool

func (*Int8) IsContiguous Uses

func (tb *Int8) IsContiguous() bool

func (*Int8) IsMutable Uses

func (tb *Int8) IsMutable() bool

IsMutable returns whether the underlying data buffer is mutable.

func (*Int8) IsRowMajor Uses

func (tb *Int8) IsRowMajor() bool

func (*Int8) Len Uses

func (tb *Int8) Len() int

func (*Int8) NumDims Uses

func (tb *Int8) NumDims() int

func (*Int8) Release Uses

func (tb *Int8) Release()

Release decreases the reference count by 1. Release may be called simultaneously from multiple goroutines. When the reference count goes to zero, the memory is freed.

func (*Int8) Retain Uses

func (tb *Int8) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Int8) Shape Uses

func (tb *Int8) Shape() []int64

func (*Int8) Strides Uses

func (tb *Int8) Strides() []int64

func (*Int8) Value Uses

func (tsr *Int8) Value(i []int64) int8

type Interface Uses

type Interface interface {
    // Retain increases the reference count by 1.
    // Retain may be called simultaneously from multiple goroutines.
    Retain()

    // Release decreases the reference count by 1.
    // Release may be called simultaneously from multiple goroutines.
    // When the reference count goes to zero, the memory is freed.
    Release()

    // Len returns the number of elements in the tensor.
    Len() int

    // Shape returns the size - in each dimension - of the tensor.
    Shape() []int64

    // Strides returns the number of bytes to step in each dimension when traversing the tensor.
    Strides() []int64

    // NumDims returns the number of dimensions of the tensor.
    NumDims() int

    // DimName returns the name of the i-th dimension.
    DimName(i int) string

    // DimNames returns the names for all dimensions
    DimNames() []string

    DataType() arrow.DataType
    Data() *array.Data

    // IsMutable returns whether the underlying data buffer is mutable.
    IsMutable() bool
    IsContiguous() bool
    IsRowMajor() bool
    IsColMajor() bool
}

Interface represents an n-dimensional array of numerical data.

func New Uses

func New(data *array.Data, shape, strides []int64, names []string) Interface

New returns a new n-dim array from the provided backing data and the shape and strides. If strides is nil, row-major strides will be inferred. If names is nil, a slice of empty strings will be created.

New panics if the backing data is not a numerical type.

type Uint16 Uses

type Uint16 struct {
    // contains filtered or unexported fields
}

Uint16 is an n-dim array of uint16s.

func NewUint16 Uses

func NewUint16(data *array.Data, shape, strides []int64, names []string) *Uint16

NewUint16 returns a new n-dimensional array of uint16s. If strides is nil, row-major strides will be inferred. If names is nil, a slice of empty strings will be created.

func (*Uint16) Data Uses

func (tb *Uint16) Data() *array.Data

func (*Uint16) DataType Uses

func (tb *Uint16) DataType() arrow.DataType

func (*Uint16) DimName Uses

func (tb *Uint16) DimName(i int) string

func (*Uint16) DimNames Uses

func (tb *Uint16) DimNames() []string

func (*Uint16) IsColMajor Uses

func (tb *Uint16) IsColMajor() bool

func (*Uint16) IsContiguous Uses

func (tb *Uint16) IsContiguous() bool

func (*Uint16) IsMutable Uses

func (tb *Uint16) IsMutable() bool

IsMutable returns whether the underlying data buffer is mutable.

func (*Uint16) IsRowMajor Uses

func (tb *Uint16) IsRowMajor() bool

func (*Uint16) Len Uses

func (tb *Uint16) Len() int

func (*Uint16) NumDims Uses

func (tb *Uint16) NumDims() int

func (*Uint16) Release Uses

func (tb *Uint16) Release()

Release decreases the reference count by 1. Release may be called simultaneously from multiple goroutines. When the reference count goes to zero, the memory is freed.

func (*Uint16) Retain Uses

func (tb *Uint16) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Uint16) Shape Uses

func (tb *Uint16) Shape() []int64

func (*Uint16) Strides Uses

func (tb *Uint16) Strides() []int64

func (*Uint16) Uint16Values Uses

func (tsr *Uint16) Uint16Values() []uint16

func (*Uint16) Value Uses

func (tsr *Uint16) Value(i []int64) uint16

type Uint32 Uses

type Uint32 struct {
    // contains filtered or unexported fields
}

Uint32 is an n-dim array of uint32s.

func NewUint32 Uses

func NewUint32(data *array.Data, shape, strides []int64, names []string) *Uint32

NewUint32 returns a new n-dimensional array of uint32s. If strides is nil, row-major strides will be inferred. If names is nil, a slice of empty strings will be created.

func (*Uint32) Data Uses

func (tb *Uint32) Data() *array.Data

func (*Uint32) DataType Uses

func (tb *Uint32) DataType() arrow.DataType

func (*Uint32) DimName Uses

func (tb *Uint32) DimName(i int) string

func (*Uint32) DimNames Uses

func (tb *Uint32) DimNames() []string

func (*Uint32) IsColMajor Uses

func (tb *Uint32) IsColMajor() bool

func (*Uint32) IsContiguous Uses

func (tb *Uint32) IsContiguous() bool

func (*Uint32) IsMutable Uses

func (tb *Uint32) IsMutable() bool

IsMutable returns whether the underlying data buffer is mutable.

func (*Uint32) IsRowMajor Uses

func (tb *Uint32) IsRowMajor() bool

func (*Uint32) Len Uses

func (tb *Uint32) Len() int

func (*Uint32) NumDims Uses

func (tb *Uint32) NumDims() int

func (*Uint32) Release Uses

func (tb *Uint32) Release()

Release decreases the reference count by 1. Release may be called simultaneously from multiple goroutines. When the reference count goes to zero, the memory is freed.

func (*Uint32) Retain Uses

func (tb *Uint32) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Uint32) Shape Uses

func (tb *Uint32) Shape() []int64

func (*Uint32) Strides Uses

func (tb *Uint32) Strides() []int64

func (*Uint32) Uint32Values Uses

func (tsr *Uint32) Uint32Values() []uint32

func (*Uint32) Value Uses

func (tsr *Uint32) Value(i []int64) uint32

type Uint64 Uses

type Uint64 struct {
    // contains filtered or unexported fields
}

Uint64 is an n-dim array of uint64s.

func NewUint64 Uses

func NewUint64(data *array.Data, shape, strides []int64, names []string) *Uint64

NewUint64 returns a new n-dimensional array of uint64s. If strides is nil, row-major strides will be inferred. If names is nil, a slice of empty strings will be created.

func (*Uint64) Data Uses

func (tb *Uint64) Data() *array.Data

func (*Uint64) DataType Uses

func (tb *Uint64) DataType() arrow.DataType

func (*Uint64) DimName Uses

func (tb *Uint64) DimName(i int) string

func (*Uint64) DimNames Uses

func (tb *Uint64) DimNames() []string

func (*Uint64) IsColMajor Uses

func (tb *Uint64) IsColMajor() bool

func (*Uint64) IsContiguous Uses

func (tb *Uint64) IsContiguous() bool

func (*Uint64) IsMutable Uses

func (tb *Uint64) IsMutable() bool

IsMutable returns whether the underlying data buffer is mutable.

func (*Uint64) IsRowMajor Uses

func (tb *Uint64) IsRowMajor() bool

func (*Uint64) Len Uses

func (tb *Uint64) Len() int

func (*Uint64) NumDims Uses

func (tb *Uint64) NumDims() int

func (*Uint64) Release Uses

func (tb *Uint64) Release()

Release decreases the reference count by 1. Release may be called simultaneously from multiple goroutines. When the reference count goes to zero, the memory is freed.

func (*Uint64) Retain Uses

func (tb *Uint64) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Uint64) Shape Uses

func (tb *Uint64) Shape() []int64

func (*Uint64) Strides Uses

func (tb *Uint64) Strides() []int64

func (*Uint64) Uint64Values Uses

func (tsr *Uint64) Uint64Values() []uint64

func (*Uint64) Value Uses

func (tsr *Uint64) Value(i []int64) uint64

type Uint8 Uses

type Uint8 struct {
    // contains filtered or unexported fields
}

Uint8 is an n-dim array of uint8s.

func NewUint8 Uses

func NewUint8(data *array.Data, shape, strides []int64, names []string) *Uint8

NewUint8 returns a new n-dimensional array of uint8s. If strides is nil, row-major strides will be inferred. If names is nil, a slice of empty strings will be created.

func (*Uint8) Data Uses

func (tb *Uint8) Data() *array.Data

func (*Uint8) DataType Uses

func (tb *Uint8) DataType() arrow.DataType

func (*Uint8) DimName Uses

func (tb *Uint8) DimName(i int) string

func (*Uint8) DimNames Uses

func (tb *Uint8) DimNames() []string

func (*Uint8) IsColMajor Uses

func (tb *Uint8) IsColMajor() bool

func (*Uint8) IsContiguous Uses

func (tb *Uint8) IsContiguous() bool

func (*Uint8) IsMutable Uses

func (tb *Uint8) IsMutable() bool

IsMutable returns whether the underlying data buffer is mutable.

func (*Uint8) IsRowMajor Uses

func (tb *Uint8) IsRowMajor() bool

func (*Uint8) Len Uses

func (tb *Uint8) Len() int

func (*Uint8) NumDims Uses

func (tb *Uint8) NumDims() int

func (*Uint8) Release Uses

func (tb *Uint8) Release()

Release decreases the reference count by 1. Release may be called simultaneously from multiple goroutines. When the reference count goes to zero, the memory is freed.

func (*Uint8) Retain Uses

func (tb *Uint8) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Uint8) Shape Uses

func (tb *Uint8) Shape() []int64

func (*Uint8) Strides Uses

func (tb *Uint8) Strides() []int64

func (*Uint8) Uint8Values Uses

func (tsr *Uint8) Uint8Values() []uint8

func (*Uint8) Value Uses

func (tsr *Uint8) Value(i []int64) uint8

Package tensor imports 5 packages (graph). Updated 2019-03-11. Refresh now. Tools for package owners.