ah... there is documentation, it is just buried... https://pkg.go.dev/gonum.org/v1/gonum/mat#section-readme
"All matrices are stored in row-major format and users should consider this when expressing matrix arithmetic to ensure optimal performance." Seems odd not to allow both; since this is usually very important for perf. On Sat, Aug 26, 2023 at 1:14 PM Jason E. Aten <j.e.a...@gmail.com> wrote: > I do alot of stats/numerical stuff but I haven't tried gonum until now. > > Yesterday I went to port a bunch of C code that uses BLAS/LAPACK > into Go, and thought I'd try it (Gonum) out. Now the logic is the original > code is very hairy, and does delicate operations like a bunch > of QR decompositions... in short, I don't want to mess with the > algorithm at all, I just want to port it to Go. The C original code runs > fine against > OpenBLAS. Of course, being numeric code, it all assumes column-major > Fortran style matrices. > > But when I tried to run the same logic on Gonum, I was hitting issues > left and right. At first I thought they were bugs in Gonum. But then > I realized, by default Gonum is assuming that your matrices will > be row-major (C-style). > > There's almost zero documentation for gonum of these kinds of > assumptions and even less about how to use > Gonum.... Like how do you switch between the Go and C BLAS implementation? > Not documented; that I can find. You would think this would be front and > center. Ugh. > > Anyway: somebody here probably knows-- does Gonum also support column-major > matrices? In the Go BLAS, or in a cgo binding to OpenBLAS? > > With Bewildered Thanks. > > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAPNEFAaT9fwg9pOq2qaoagazH5h1kOYVw3dGs9UuSYYW_xAECQ%40mail.gmail.com.