Implement `torch_tensor_to_array`
FTorch implements torch_tensor_from_array to map Fortran arrays to (F)Torch tensors. It would be useful to have the reverse mapping, too.
This would provide a way to get around the issue mentioned in #139.
Good idea. Would it be worth having an alias for it as well called torch_array_from_tensor?
Good idea. Would it be worth having an alias for it as well called
torch_array_from_tensor?
Sure, I guess torch_array_to_tensor would then complete the set.
Inderdaad.
Interesting, I always read it as being "create a torch_tensor from a fortran_array" and this is how we refer to things in our docs - and we have an object called a torch_tensor.
I feel like torch_array from tensor could be ambiguous on this front.
However, I feel like all our routines all being prepended with torch_ is nice too...