Skip to contents

Convert objects to fm_tensor

Usage

fm_as_tensor(x, ...)

fm_as_tensor_list(x, ...)

# S3 method for fm_tensor
fm_as_tensor(x, ...)

Arguments

x

Object to be converted

...

Arguments passed on to submethods

Value

An fm_tensor object

Functions

  • fm_as_tensor(): Convert an object to fm_tensor.

  • fm_as_tensor_list(): Convert each element of a list

See also

Examples

fm_as_tensor_list(list(fm_tensor(list())))
#> [[1]]
#> $fun_spaces
#> list()
#> 
#> attr(,"class")
#> [1] "fm_tensor"
#> 
#> attr(,"class")
#> [1] "fm_tensor_list" "fm_list"        "list"