SOMADenseNDArray
is a dense, N-dimensional array of primitive
type, with
offset (zero-based) int64
integer indexing on each dimension with domain
[0, maxInt64)
. The SOMADenseNDArray
has a user-defined schema, which
includes:
type: a
primitive
type, expressed as an Arrow type (e.g.,int64
,float32
, etc), indicating the type of data contained within the arrayshape: the shape of the array, i.e., number and length of each dimension
All dimensions must have a positive, non-zero length, and there must be 1 or more dimensions.
The default "fill" value for SOMADenseNDArray
is the zero or null value of
the array type (e.g., Arrow.float32 defaults to 0.0).
The write
method is currently limited to writing from 2-d matrices.
(lifecycle: maturing)
Super classes
tiledbsoma::TileDBObject
-> tiledbsoma::TileDBArray
-> tiledbsoma::SOMAArrayBase
-> tiledbsoma::SOMANDArrayBase
-> SOMADenseNDArray
Methods
Inherited methods
tiledbsoma::TileDBObject$class()
tiledbsoma::TileDBObject$exists()
tiledbsoma::TileDBObject$initialize()
tiledbsoma::TileDBObject$is_open()
tiledbsoma::TileDBObject$mode()
tiledbsoma::TileDBObject$reopen()
tiledbsoma::TileDBArray$attributes()
tiledbsoma::TileDBArray$attrnames()
tiledbsoma::TileDBArray$close()
tiledbsoma::TileDBArray$colnames()
tiledbsoma::TileDBArray$dimensions()
tiledbsoma::TileDBArray$dimnames()
tiledbsoma::TileDBArray$get_metadata()
tiledbsoma::TileDBArray$index_column_names()
tiledbsoma::TileDBArray$maxshape()
tiledbsoma::TileDBArray$ndim()
tiledbsoma::TileDBArray$non_empty_domain()
tiledbsoma::TileDBArray$open()
tiledbsoma::TileDBArray$print()
tiledbsoma::TileDBArray$schema()
tiledbsoma::TileDBArray$set_metadata()
tiledbsoma::TileDBArray$shape()
tiledbsoma::TileDBArray$tiledb_array()
tiledbsoma::TileDBArray$tiledb_schema()
tiledbsoma::TileDBArray$used_shape()
tiledbsoma::SOMANDArrayBase$create()
tiledbsoma::SOMANDArrayBase$resize()
tiledbsoma::SOMANDArrayBase$set_data_type()
tiledbsoma::SOMANDArrayBase$tiledbsoma_has_upgraded_shape()
tiledbsoma::SOMANDArrayBase$tiledbsoma_upgrade_shape()
Method read_arrow_table()
Read as an 'arrow::Table' (lifecycle: maturing)
Arguments
coords
Optional
list
of integer vectors, one for each dimension, with a length equal to the number of values to read. IfNULL
, all values are read. List elements can be named when specifying a subset of dimensions.result_order
Optional order of read results. This can be one of either
"ROW_MAJOR,
"COL_MAJOR", or
"auto"` (default).result_order
Optional order of read results. This can be one of either
"ROW_MAJOR,
"COL_MAJOR", or
"auto"` (default).log_level
Optional logging level with default value of
"warn"
.
Returns
An arrow::Table
.
Method read_dense_matrix()
Read as a dense matrix (lifecycle: maturing)
Usage
SOMADenseNDArray$read_dense_matrix(
coords = NULL,
result_order = "ROW_MAJOR",
log_level = "warn"
)
Arguments
coords
Optional
list
of integer vectors, one for each dimension, with a length equal to the number of values to read. IfNULL
, all values are read. List elements can be named when specifying a subset of dimensions.result_order
Optional order of read results. This can be one of either
"ROW_MAJOR,
"COL_MAJOR", or
"auto"` (default).result_order
Optional order of read results. This can be one of either
"ROW_MAJOR,
"COL_MAJOR", or
"auto"` (default).log_level
Optional logging level with default value of
"warn"
.
Method write()
Write matrix data to the array. (lifecycle: maturing)
More general write methods for higher-dimensional array could be added.
Arguments
values
A
matrix
. Character dimension names are ignored becauseSOMANDArray
's use integer indexing.coords
A
list
of integer vectors, one for each dimension, with a length equal to the number of values to write. IfNULL
, the default, the values are taken from the row and column names ofvalues
.