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

Single column from dataset returns Matrix, not Vector #267

Closed
garrison opened this issue Sep 26, 2015 · 2 comments
Closed

Single column from dataset returns Matrix, not Vector #267

garrison opened this issue Sep 26, 2015 · 2 comments

Comments

@garrison
Copy link

With standard Julia arrays, requesting a column from a Matrix returns a Vector:

julia> size(rand(4, 4)[:,1])
(4,)

However, requesting a column from a dataset that represents a matrix returns a Matrix with one column.

using HDF5

h5open("/tmp/test_filename.h5", "w") do file
    file["mat"] = rand(4, 4)
    @show size(file["mat"][:,1])
end

Is this intentional?

@musm
Copy link
Member

musm commented Dec 7, 2020

fixed.

@musm musm closed this as completed Dec 7, 2020
@musm
Copy link
Member

musm commented Dec 7, 2020

julia>  @show size(file["mat"][:,1])
(4,)

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