Dear ROOT experts,
I am trying to migrate some simple linear-algebra ROOT code from c++ to python but it fails with on multiplication of TMatrixT and TVectorT. The code (based on rootfit output):
eigen_vectors_inverted = decomposed_matrix.GetEigenVectors()
eigen_vectors_inverted.Invert()
diagonalized_values = eigen_vectors_inverted * ROOT.TVectorD(
len(self.samples), array('d', [x.yield_var.getValV() for x in self.samples.values()]))
where nulllptr seems to be propagated from python to c++, leading to following error:
ValueError: none of the 2 overloaded methods succeeded. Full details:
TVectorT<double> ::operator*<double>(const TMatrixT<double>& a, const TVectorT<double>& source) =>
ValueError: nullptr result where temporary expected
TVectorT<double> ::operator*<double>(const TMatrixT<double>& a, const TVectorT<double>& source) =>
ValueError: nullptr result where temporary expected
>
I checked the the two objects I am trying to multiply are properly defined so the error is probably in the binding?
ROOT Version: 6.28/10 (but also tried 6.26)
Platform: x86_64-centos7
Compiler: gcc11, python 3.9.12
Thanks for any help