-
Notifications
You must be signed in to change notification settings - Fork 521
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
Documentation gives wrong default arguments for require_dataset
#1994
Comments
I think the downside of allowing
Groups also support the standard Python mapping API, so you've already got I agree that the docs should be corrected, though. Do you want to make a PR? |
Although admittedly |
Maybe a look into other languages HDF5 APIs would provide some insight? I'm actually in the exact case you mention, where I want to write new data into a possibly existing dataset, overwriting if the dataset already exists. I'll let someone who's more familiar than me with the documentation system take care of the PR, I just created the Issue to report the problem I stumbled across. |
After testing,
I'm not sure whether this behavior is expected.
|
Where are the docs wrong? The docstring looks correct to me. I am with @takluyver , adding a data kwarg to |
The docstring itself is fine, but the doc has You're probably right about the |
Odd, we are not using autodoc and the have a copy of the docstring in the rst: https://github.com/h5py/h5py/blob/master/docs/high/group.rst#L385-L399 Changing to auto-doc is a big project, but the quick fix is to edit the rst to remove the default arguments. Looks like this has been wrong for ~forever. |
The API documentation suggests that arguments
shape
anddtype
are optional (both defaulting toNone
) forGroup.require_dataset
, while they are in fact positional (seeh5py/_hl/hroup.py:214
).However it would be a very useful feature to be able to require a dataset from
data
input instead ofshape
anddtype
(similarly toGroup.create_dataset
).The text was updated successfully, but these errors were encountered: