Implement `torch_tensor_to_array`
Closes #151.
Implements torch_to_blob on the C++ side and torch_tensor_to_array on the Fortran side.
Updates example 1 to use this.
I have a question about the update to example 1 - presumably the use of
torch_tensor_to_arrayis redundant here if you had not also changed theout_datatopointer?
Agreed. I was planning to switch this to torch_tensor_empty, but this hasn't been implemented yet.
My feeling is that this adds additional layers of confusion and is not what this example is intended to show as people's first entry point to FTorch. Perhaps there could be a separate example for introducing the autograd features?
Yeah, fair enough. Perhaps this PR could start the autograd demo as just "to tensor" and then "to array".
This is now ready for review, with thanks to @TomMelt for input on the C++ side.