Skip to content

Commit

Permalink
Merge branch 'main' into wma/heuristic
Browse files Browse the repository at this point in the history
  • Loading branch information
willow-ahrens authored May 19, 2024
2 parents d4f691f + 8c107d1 commit f15b948
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/interface/fileio/binsparse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ function bspread_header end
function bspread(f)
desc = bspread_header(f)["binsparse"]
@assert desc["version"] == "$BINSPARSE_VERSION"
fmt = OrderedDict{Any, Any}(get(() -> desc["tensor"], bspread_tensor_lookup, desc["format"]))
fmt = OrderedDict{Any, Any}(get(() -> bspread_tensor_lookup[desc["format"]], desc, "tensor"))
if !haskey(fmt, "transpose")
fmt["transpose"] = collect(0:length(desc["shape"]) - 1)
end
Expand Down
7 changes: 7 additions & 0 deletions test/test_fileio.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ using Pkg
end
end
end

B = fsprand(100, 100, 100, 0.1)
@testset "binsparse COO3" begin
fname = joinpath(f, "foo.bsp.h5")
bspwrite(fname, B)
@test Structure(B) == Structure(bspread(fname))
end
end
end

Expand Down

0 comments on commit f15b948

Please sign in to comment.