There is a bug in the Tensor class such that it is possible to have NSL::Tensor and the contained torch::tensor being of different types.
We realized that by using
NSL::Tensor<NSL::complex<double>> Mat(2,2); Mat.randn();
Mat+=Mat.T()
auto [ee,ev] = NSL::LinAlg::eigh(Mat,"L");
Here ee is of type NSL::Tensor<NSL::complex<double>> but the contained torch::tensor is of type double.
There is a bug in the Tensor class such that it is possible to have
NSL::Tensor
and the containedtorch::tensor
being of different types. We realized that by usingHere
ee
is of typeNSL::Tensor<NSL::complex<double>>
but the containedtorch::tensor
is of typedouble
.