Skip to content

Commit

Permalink
fix binsparse
Browse files Browse the repository at this point in the history
  • Loading branch information
willow-ahrens committed Nov 27, 2023
1 parent 78ee7e0 commit 83e2f05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/fileio/binsparse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ function bspwrite_tensor(io, arr::SwizzleArray{dims, <:Fiber}, attrs = OrderedDi
"fill" => true,
"shape" => map(Int, size(arr)),
"data_types" => OrderedDict(),
"version" => "0.1",
"attrs" => attrs,
)
if !issorted(reverse(collect(dims)))
Expand Down Expand Up @@ -308,6 +309,7 @@ function bspread_header end

function bspread(f)
desc = bspread_header(f)["binsparse"]
@assert desc["version"] == "0.1"
fmt = OrderedDict{Any, Any}(get(bspread_format_lookup, desc["format"], desc["format"]))
if !haskey(fmt, "swizzle")
fmt["swizzle"] = collect(0:length(desc["shape"]) - 1)
Expand Down

0 comments on commit 83e2f05

Please sign in to comment.