Skip to contents

as_delarr() wraps a serializable array source as a delarr provider so that bounded, chunk-aware execution can be delegated to delarr without materializing the assay. The realization budget is enforced before any provider is created.

Usage

as_delarr(x, memory_budget = Inf, ...)

# Default S3 method
as_delarr(x, memory_budget = Inf, ...)

Arguments

x

An array source, or another object with an as_delarr() method.

memory_budget

Maximum realized bytes permitted for a single pull. Inf disables the check.

...

Additional arguments passed to methods.

Value

A delarr lazy array whose pulls route through source_read().

See also

array-source for the source protocol.

Examples

src <- memory_source(matrix(seq_len(6), nrow = 2))
lazy <- as_delarr(src)
dim(lazy)
#> [1] 2 3