tiledbsoma.DenseNDArray.create

classmethod DenseNDArray.create(uri: str, *, type: DataType, shape: Sequence[int | None], platform_config: Dict[str, Mapping[str, Any]] | object | None = None, context: SOMATileDBContext | None = None, tiledb_timestamp: int | datetime | None = None) Self

Creates a SOMA DenseNDArray at the given URI.

Parameters:
  • type – The Arrow type to be stored in the NDArray. If the type is unsupported, an error will be raised.

  • shape – The current maximum capacity of each dimension. All lengths must be in the positive int64 range. The shape can be increased, but not decreased, after creation.

  • platform_config – Platform-specific options used to create this array. This may be provided as settings in a dictionary, with options located in the {'tiledb': {'create': ...}} key, or as a TileDBCreateOptions object.

  • tiledb_timestamp – If specified, overrides the default timestamp used to open this object. If unset, uses the timestamp provided by the context.

Returns:

The created DenseNDArray.

Raises:

Examples

>>> with tiledbsoma.DenseNDArray.create("array1", type=pa.float64(), shape=(1000, 100, 100)) as array:
>>>     print(array.schema)
soma_dim_0: int64 not null
soma_dim_1: int64 not null
soma_dim_2: int64 not null
soma_data: double not null

Lifecycle

Maturing.