Cytnx
Cytnx copied to clipboard
return_err for Svd_truncate
Currently, when the input of cytnx.linalg.Svd_truncate() is a UniTensor and return_err=True, it will return return_err as a UniTensor.
I think we should just return return_err as a scalar.
This problem caused from the constrain of C++. C++ can only one type variable like:
std::vector<cytnx::UniTensor> Svd_truncate(...) {
...
}
not like python can return several type:
svds, error = Svd_truncate(...)
Since the library use pybind so we just put the error info in the UniTesnor.