Transfers array data to R and returns it as an R array.
Only in the case of scalars is the result a vector of length 1, as R arrays cannot have 0 axes.
Arguments
- x
(
arrayish)
An array-like object.- check
(
character(1)|FALSE)
How to report a materialized value that the R type cannot hold:"warn"(the default) warns and returns it anyway,"err"aborts, andFALSEskips the scan.TRUEis not accepted – with two levels of strictness it does not say which one is meant. Forwarded to the backend; for thepjrtbackend the cases scanned for arei32/i64values colliding with theNAbit pattern andui64values>= 2^63wrapping throughbit64::integer64. Seepjrt::as_array.PJRTBuffer()for the full list, and the "Gotchas" vignette.- ...
Additional arguments passed to methods (unused).
Value
(array | vector(1))
An R array with the input's shape, or – for a scalar, which R cannot
represent as an array – a vector of length 1.
Details
This is implemented via the generic tengen::as_array().