This seems to be happening because on a 64-bit reshape(ones(Float32, 1, 4), 2, 2) works whereas the following doesn't. Similarly, Int64 doesn't work on 32-bit-
I would be happy to send a PR fixing this and adding the tests.
The Appveyor script seems to be outdated (Julia 0.6 (?) ), I can update that as well also adding x86 to it.
This is somewhat similar to #41 .
Here's an MWE - Assume
using BSON
andusing BSON:@save
On a 32-bit system
@test BSON.load("saved_on_64bit.bson")[:a] == ones(Float32, 2, 2)
gives the following stack trace https://gist.github.com/Ayushk4/2376db8679caa5e9f70c13abe89c981eThis was narrowed down to https://github.com/JuliaIO/BSON.jl/blob/a58c88a14e07d0beed8f56edb79e5cbea7078e00/src/extensions.jl#L80
This seems to be happening because on a 64-bit
reshape(ones(Float32, 1, 4), 2, 2)
works whereas the following doesn't. Similarly, Int64 doesn't work on 32-bit-It can be fixed by changing the line to
reshape(reinterpret_(d[:type], d[:data]), map(normalize_typeparams, d[:size])...) :
.Versions - BSON v0.2.4 Julia 1.3
Came here from JuliaText/TextAnalysis.jl#180