-
Notifications
You must be signed in to change notification settings - Fork 76
Compatibility for Julia v 1.0.1 #100
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
Conversation
yuyichao
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still dup of #86 but if you make sure you don't touch the copying related ones, fix all the comments below, this can be merged if you claim that it fixes some usecases.
You do need to raise the julia requirement to at least 0.6.
src/MAT.jl
Outdated
| to a Matlab file, opening and closing it automatically. | ||
| """ | ||
| function matwrite{S, T}(filename::AbstractString, dict::Associative{S, T}) | ||
| function matwrite(filename::AbstractString, dict::Dict{S, T}) where{S,T} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AbstractDict.
| mattype = a_read(dset, name_type_attr_matlab) | ||
| if mattype == "char" | ||
| return "" | ||
| elseif mattype == "struct" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't delete this!
src/MAT_HDF5.jl
Outdated
|
|
||
| # Write the MATLAB type string for dset | ||
| m_writetypeattr{T}(dset, ::Type{Complex{T}}) = m_writetypeattr(dset, T) | ||
| m_writetypeattr(dset, ::Type{Complex{T}}) where{T} = m_writetypeattr(dset, T) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EOL whitespace.
src/MAT_HDF5.jl
Outdated
|
|
||
| # Write Associative as a struct | ||
| m_write(mfile::MatlabHDF5File, parent::HDF5Parent, name::String, s::Associative) = | ||
| m_write(mfile::MatlabHDF5File, parent::HDF5Parent, name::String, s::Dict) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AbstractDict.
src/MAT.jl
Outdated
|
|
||
| # Check for MAT v4 file | ||
| magic = read!(rawfid, Vector{UInt8}(4)) | ||
| magic = read!(rawfid, Vector{UInt8}(undef,4)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space after the ,, same below.
|
And this shouldn't drop 0.6 support so you need |
|
Sorry I made a mistake when updating this branch (I pushed my local master instead of the updated branch to the PR branch) and it appears not revertable so I reopenned this as #102 |
I mostly rewrote :
some functions definitions with the new syntax ' func(... : : T) where{T}'.
struct definitions with the keyword 'struct' instead of 'type'
old variables Vector{UInt8}(nbytes) to Vector{UInt8}(undef,nbytes)
After these modifications i was able to read some .mat files