BUG: dgbmv gives "(len(x)>offx+(trans==0?m-1:n-1)*abs(incx)) failed for 7th argument x" #18647
Labels
defect
A clear bug or issue that prevents SciPy from being installed or used as expected
scipy.linalg
Milestone
I get an error that the size of the x argument is incorrect when using
dgbmv
.See the following MWE where I am creating a 5×7 matrix in BLAS general band format with zero subdiagonals and two superdiagonals. When the matrix is multiplied by a vector of length 7 it works fine. When dgbmv is asked to compute the product of the transpose of the matrix by a vector of length 5, it gives an error.
If I pass an unnecessarily longer argument as
x
, it works fine and produces the correct answer:Note that the two extra elements of x1 (compared to x2) are not used, otherwise the NaNs would propagate to the outputs.
It looks like the code doing the work is fine but there is a problem with the code checking the size of the arguments.
I am using numpy=1.23.5 and scipy=1.10.1.
The text was updated successfully, but these errors were encountered: