File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ object V:
3939 val scalaTags: Dep = mvn"com.lihaoyi::scalatags::0.13.1"
4040 val scalaVersion = "3.7.2"
4141 val munitVersion = "1.1.1"
42- val blas: Dep = mvn"dev.ludovic.netlib:blas:3.1.1 "
43- val lapack: Dep = mvn"dev.ludovic.netlib:lapack:3.1.1 "
42+ val blas: Dep = mvn"dev.ludovic.netlib:blas:3.2.0 "
43+ val lapack: Dep = mvn"dev.ludovic.netlib:lapack:3.2.0 "
4444 val scalaJavaTime: Dep = mvn"io.github.cquiroz::scala-java-time::2.6.0"
4545 val catsVersion = "2.13.0"
4646 val disciplineVersion = "2.0.0"
Original file line number Diff line number Diff line change @@ -157,7 +157,10 @@ object Svd:
157157 val ldu = math.max(1 , m)
158158 val ldvt = math.max(1 , vtRows)
159159
160- val uArr = Array .ofDim[Double ](ldu * uCols)
160+ // Allocate ldu * m (not ldu * uCols) because netlib validates u.length >= ldu * m
161+ // regardless of ReducedSVD mode (changed in netlib 3.2.0). Only the first uCols
162+ // columns contain meaningful data; the Matrix wrapper uses uCols as the column count.
163+ val uArr = Array .ofDim[Double ](ldu * m)
161164 val vtArr = Array .ofDim[Double ](ldvt * n)
162165
163166 val workQuery = Array .ofDim[Double ](1 )
You can’t perform that action at this time.
0 commit comments