Skip to contents

Adds NDArray-specific functionality to the SOMAArrayBase class. (lifecycle: maturing)

Methods

Inherited methods


Method create()

Create a SOMA NDArray named with the URI. (lifecycle: maturing)

Usage

SOMANDArrayBase$create(
  type,
  shape,
  platform_config = NULL,
  internal_use_only = NULL
)

Arguments

type

an Arrow type defining the type of each element in the array.

shape

a vector of integers defining the shape of the array.

platform_config

A platform configuration object

internal_use_only

Character value to signal this is a 'permitted' call, as create() is considered internal and should not be called directly.


Method set_data_type()

Sets a cache value for the datatype (lifecycle: maturing)

Usage

SOMANDArrayBase$set_data_type(type)

Arguments

type

A character value describing the TileDB data type


Method tiledbsoma_has_upgraded_shape()

Returns TRUE if the array has the upgraded resizeable shape feature from TileDB-SOMA 1.15: the array was created with this support, or it has had upgrade_domain applied to it. (lifecycle: maturing)

Usage

SOMANDArrayBase$tiledbsoma_has_upgraded_shape()

Returns

Logical


Method resize()

Increases the shape of the array as specified, up to the hard limit which is maxshape. Raises an error if the new shape is less than the current shape in any dimension. Raises an error if the requested new shape exceeds maxshape in any dimension. Raises an error if the array doesn't already have a shape: in that case please call tiledbsoma_upgrade_shape. (lifecycle: maturing)

Usage

SOMANDArrayBase$resize(new_shape)

Arguments

new_shape

A vector of integerish, of the same length as the array's ndim.

Returns

No return value


Method tiledbsoma_upgrade_shape()

Allows the array to have a resizeable shape as described in the TileDB-SOMA 1.15 release notes. Raises an error if the shape exceeds maxshape in any dimension. Raises an error if the array already has a shape. The methods tiledbsoma_upgrade_shape and resize are very similar: the former must be call on a pre-1.15 array the first time a shape is set on it; the latter must be used for subsequent resizes on any array which already has upgraded shape. (lifecycle: maturing)

Usage

SOMANDArrayBase$tiledbsoma_upgrade_shape(shape)

Arguments

shape

A vector of integerish, of the same length as the array's ndim.

Returns

No return value


Method clone()

The objects of this class are cloneable with this method.

Usage

SOMANDArrayBase$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.