Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An array saved on Julia 0.6.3 gets messed up on Julia 1.0.0 #522

Closed
kzapfe opened this issue Oct 10, 2018 · 0 comments
Closed

An array saved on Julia 0.6.3 gets messed up on Julia 1.0.0 #522

kzapfe opened this issue Oct 10, 2018 · 0 comments

Comments

@kzapfe
Copy link

kzapfe commented Oct 10, 2018

We had many problems with the passage from jld to jld2. So the solution for our data was to stick to plain hdf5, which should work with both Julia versions, 0.6.x and 1.0.x, or that was our hope.
I had some data that was saved as Sets, in Julia 0.6.3. If I tried to open them in Julia 1.0.0 with the HDF5 package, I would get an object of the sort:

HDF5.HDF5Compound{1}((UInt8[0x68, 0x59, 0x46, 0x02, 0x00, 0x00, 0x00, 0x00],), ("dict_",), (HDF5.HDF5ReferenceObj,))

which seems illegible to me and which is also suspiciously smaller than the Set (it was a set compossed of elements of the type Array{Int64, 2}.
By reading HDF5 documentation I found out that Sets were not supported. So I made a script in Julia 0.6.3 that opened my *.jld data, retrieved the Set variables, and converted them to an array. I tried an array of arrays, but that also is not supported, so i did a two dimensional array.

Then I saved the old variables (the ones that didn't give problems) and the new ones in an hdf5 file.
If I opened them in Julia 0.6.3, the variable in question was allright, but in Julia 1.0.0 the two dimensional array appeared as a 1-dimensional array with columns stacked over each other, and with some data missing (the first two numbers and the last).
Other data (a big three dimensional array of Floats) was untouched by the script and appeared right on the newer Julia. I am seriously puzzled by this behaviour.

The script can be seen here:
my repository.

@musm musm closed this as completed Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants