RobinHankin / stokes

methods for exterior calculus
https://robinhankin.github.io/stokes/
3 stars 0 forks source link

as.function() fails on zero tensor #42

Closed RobinHankin closed 3 years ago

RobinHankin commented 3 years ago
> A <- rtensor()
> A
A linear map from V^3 to R with V=R^7:
           val
 4 7 3  =    1
 2 5 1  =    5
 [snip]
> M <- matrix(rnorm(21),ncol=3)
> as.function(A)(M)
[1] -10.20916
> as.function(A*0)(M)
Error in sum(sapply(p, function(i) { : invalid 'type' (list) of argument
>