Open
Description
There is a bug in how complex numbers are being read.
Here is an example:
julia> using Zarr
julia> p = tempname()
"/tmp/jl_GLajCLonen"
julia> z1 = zcreate(Complex{Float32}, 10,10,path = p,chunks=(10, 10))
ZArray{ComplexF32} of size 10 x 10
julia> z1 .= 42f0*im
ZArray{ComplexF32} of size 10 x 10
julia> z2 = zopen(p)
ZArray{ComplexF64} of size 10 x 10
julia> z1[:,:] == z2[:,:]
false
julia> using JSON
julia> JSON.parsefile(joinpath(p, ".zarray"))["dtype"]
"<c8"
The "dtype" of the array is "<c8", so it is a complex number with a total of 8 bytes, or Complex{Float32}
in Julia, but is getting incorrectly read as Complex{Float64}
This issue is fixed by PR #181
Metadata
Metadata
Assignees
Labels
No labels