JLD.jl icon indicating copy to clipboard operation
JLD.jl copied to clipboard

How to save AxisArrays ? By save() with JLD is error. ERROR

Open programistawpf opened this issue 8 years ago • 0 comments
trafficstars

| || | | | (| | | Version 0.5.0 (2016-09-19 18:14 UTC) / |'|||'_| | Official http://julialang.org/ release |__/ | x86_64-w64-mingw32

julia> Pkg.update() INFO: Updating METADATA... INFO: Updating cache of DataFrames... INFO: Updating cache of DataFrames... INFO: Computing changes... INFO: No packages to install, update or remove

julia> using Images, Unitful, AxisArrays

julia> using Unitful: mm, s

julia>

julia> img = AxisArray(rand(256, 256, 100, 50), (:x, :y, :z, :time), (0.4mm, 0.4mm, 1mm, 2s)) all is ok julia> typeof(img) AxisArrays.AxisArray{Float64,4,Array{Float64,4},Tuple{AxisArrays.Axis{:x,Ranges.LinSpace{Quantity{Float64, Dimensions:{? }, Units:{mm}}}},AxisArrays.Axis{:y,Ranges.LinSpace{Quantity{Float64, Dimensions:{?}, Units:{mm}}}},AxisArrays.Axis{:z,S tepRange{Quantity{Int64, Dimensions:{?}, Units:{mm}},Quantity{Int64, Dimensions:{?}, Units:{mm}}}},AxisArrays.Axis{:time ,StepRange{Quantity{Int64, Dimensions:{?}, Units:{s}},Quantity{Int64, Dimensions:{?}, Units:{s}}}}}}

julia> using JLD

julia> save("img4d.jld","img",img) ERROR: type parameters with objects of type Tuple{Unitful.Dimension{:Length}} are currently unsupported in full_typename(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::JLD.JldFile, ::Tuple{Unitful.Dimension{:Length}}) at C:\Use rs\PC.julia\v0.5\JLD\src\JLD.jl:1072 in full_typename(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::JLD.JldFile, ::DataType) at C:\Users\PC.julia\v0.5\JLD\src \JLD.jl:1107 in full_typename(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::JLD.JldFile, ::DataType) at C:\Users\PC.julia\v0.5\JLD\src \JLD.jl:1110 in full_typename(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::JLD.JldFile, ::DataType) at C:\Users\PC.julia\v0.5\JLD\src \JLD.jl:1107 in full_typename(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::JLD.JldFile, ::DataType) at C:\Users\PC.julia\v0.5\JLD\src \JLD.jl:1110 in full_typename(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::JLD.JldFile, ::DataType) at C:\Users\PC.julia\v0.5\JLD\src \JLD.jl:1107 in full_typename(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::JLD.JldFile, ::DataType) at C:\Users\PC.julia\v0.5\JLD\src \JLD.jl:1110 in full_typename(::JLD.JldFile, ::Type{T}) at C:\Users\PC.julia\v0.5\JLD\src\JLD.jl:1120 in commit_datatype(::JLD.JldFile, ::HDF5.HDF5Datatype, ::Any) at C:\Users\PC.julia\v0.5\JLD\src\jld_types.jl:70 in h5type(::JLD.JldFile, ::Any, ::Bool) at C:\Users\PC.julia\v0.5\JLD\src\jld_types.jl:377 in #write_compound#21(::Array{Any,1}, ::Function, ::JLD.JldFile, ::String, ::AxisArrays.AxisArray{Float64,4,Array{Float 64,4},Tuple{AxisArrays.Axis{:x,Ranges.LinSpace{Quantity{Float64, Dimensions:{?}, Units:{mm}}}},AxisArrays.Axis{:y,Ranges...

Paul

programistawpf avatar Feb 08 '17 09:02 programistawpf