-
Notifications
You must be signed in to change notification settings - Fork 141
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
Remove confusing example of create_dataset
#974
Conversation
How about we show how to use |
I think this is described in the "Reading and writing data" section. Lines 153 to 158 in d6ecf42
It is also described in the "Mid-level routines" section. Lines 463 to 468 in d6ecf42
|
Not sure how removing this helps clarity. It seems like the paragraph above is clear on how to 'create' and also how to 'write' datasets. Perhaps instead you could add more explanatory text on where you think the prose is lacking? |
He's right in that the second call to I think it would clearer if we called this section "Creating a group or dataset": Creating a group or datasetGroups can be created via the function
We can create
Alternatively, we can call
Creating a dataset within a group is as simple as indexing into the group with the name of the dataset or calling
The
|
What you wrote seems much clearer than what is currently there. I find
data = rand(10)
dset = create_dataset(fid, "myvector", data)
write(dset, data)
|
I changed all the instances in my comment to |
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.
This looks good to me. I suggest we consider deprecating the create_dataset
form in another pull request that takes an array instance but does not write. After deprecation, we could then consider whether to reinstate it along the lines of the h5py interface.
Based on the example:
HDF5.jl/docs/src/index.md
Lines 89 to 99 in d6ecf42
I thought
create_dataset
would write the data, butcreate_dataset
doesn't actually write any data, it just creates the dataset.