You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using copyto! with wrap_gsl_matrix, the result looks correct but it is not.
using GSL
mat =reshape([Float64(10*j+i) for i=1:2for j=1:4],4,2)
matgsl = GSL.matrix_alloc(4,2)
copyto!(GSL.wrap_gsl_matrix(matgsl), CartesianIndices((4,2)), mat, CartesianIndices((4,2)))
Which gives the expected results for mat and GSL.wrap_gsl_matrix(matgsl)
Actually, it doesn't have to do with copyto!; I got rid of that and still I must fix up the wrap_gsl_matrix() result. With solngsl being the GSL matrix pointer,
Is that simply because GSL is row-major, while Julia is column-major? Having to transpose matrices when interacting with external libraries is pretty normal.
When using
copyto!
withwrap_gsl_matrix
, the result looks correct but it is not.Which gives the expected results for
mat
andGSL.wrap_gsl_matrix(matgsl)
but e.g. the first column that's actually in the GSL matrix is not correct
The text was updated successfully, but these errors were encountered: