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
It seems System.Double is currently not supported. I have a class that returns a 2D double matrix (System.Double[,]) that I would like to retrieve in Julia. Is this currently possible or does It need to be added to the package?
The text was updated successfully, but these errors were encountered:
Yes it was not supported and I think it's necessary. Added in #4 .
DotNET.jl doesn't have array access syntax for CLR objects yet, however you can use Get/SetValue methods as an alternative.
julia> using DotNET
julia> arr=T"System.Array".CreateInstance(T"System.Double",3,4)
System.Double[,]("System.Double[,]")
julia> arr.Length
12
julia> arr.GetLength(Int32(0))
3
julia> arr.GetLength(Int32(1))
4
julia> for r=0:2
for c=0:3
arr.SetValue(1+r+c*3,r,c)
end
end
julia> permutedims(reshape(collect(arr),4,3))
3×4 Array{Float64,2}:
1.0 4.0 7.0 10.0
2.0 5.0 8.0 11.0
3.0 6.0 9.0 12.0
It seems System.Double is currently not supported. I have a class that returns a 2D double matrix (System.Double[,]) that I would like to retrieve in Julia. Is this currently possible or does It need to be added to the package?
The text was updated successfully, but these errors were encountered: