xtensor-blas icon indicating copy to clipboard operation
xtensor-blas copied to clipboard

Fix: lstsq compilation with complex<float> inputs

Open deniz-unal opened this issue 8 months ago • 0 comments

This fix resolves a compilation error gelsd.tcc:146:25: error: invalid conversion from 'const float*' to 'cxxlapack::FLOAT_COMPLEX*' when linalg::lstsq is called with complex arguments. Note that complex<double> and other types were unaffected.

  • A test case that demonstrates the issue is added to test/test_linalg.cpp
  • The fix adds const to the relevant interface to correctly match the expected input data type
  • The test compiles and passes with this fix

deniz-unal avatar Jun 17 '25 16:06 deniz-unal