Skip to content

Issue in writing dict type  #38

@Himscipy

Description

@Himscipy

Hi,

Thank you for the NPZ.jl package. I am using the package as follows

function SaveNPZ(loc,ROMParam, U)
    if ispath(loc) == false
        println("Current working directory \n", pwd() )
        # Make the directory....
        mkdir(loc)
    end
    tmp_file  =  joinpath(loc,"mydata.npz") #string( loc,"Zone_",string(j) )loc 
    println(tmp_file)
    npzwrite(tmp_file, Dict("ROMParam" => ROMParam, "U" => U) )
end

I am getting following error at the runtime not sure what I am doing wrong..novice to julia...!!

ERROR: LoadError: MethodError: no method matching npzwritearray(::ZipFile.WritableFile, ::Dict{Any,Any}) Closest candidates are: npzwritearray(::IO, !Matched::AbstractArray{UInt8,N} where N, !Matched::DataType, !Matched::Array{Int64,1}) at /Users/shar306/.julia/packages/NPZ/OBINJ/src/NPZ.jl:273 npzwritearray(::IO, !Matched::AbstractArray{T,N} where N) where T at /Users/shar306/.julia/packages/NPZ/OBINJ/src/NPZ.jl:298 npzwritearray(::IO, !Matched::T) where T<:Number at /Users/shar306/.julia/packages/NPZ/OBINJ/src/NPZ.jl:302

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions