Closed Bbllaaddee closed 3 years ago
Hello!
I wonder if there's any way of transforming a Tensor<double> to double, for example. I found the following way:
Tensor<double>
double
Tensor<double> a = 5; double b = *a.data();
, but it seems a little verbose.
Probably implement
template<typename T> T Tensor<T>::operator T() {} // pseudo-syntax
of some sort for conversion?
Cheers!
This is already implemented as
Tensor<double> a = 3; double b = a.toscalar();
Hello!
I wonder if there's any way of transforming a
Tensor<double>
todouble
, for example. I found the following way:, but it seems a little verbose.
Probably implement
of some sort for conversion?
Cheers!