carten.spad line 580 [edit on github]
This package provides functions to enable conversion of tensors given conversion of the components.
map(f, ts)
does a componentwise conversion of the tensor ts
to a tensor with components of type T
.
reshape(lt, ts)
organizes the list of components lt
into a tensor with the same shape as ts
.