We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As far as I can tell, this library does not include support for reading/writing/deleting attributes ( https://www.hdfgroup.org/HDF5/doc1.6/UG/13_Attributes.html )
While it's not clean or complete, I was able to create attributes of type Double on groups by adding this code to Group.swift:
/// Create an attribute public func createAttribute(name: String) -> hid_t { let dataspace = Dataspace.init(dims: [1, 1]) let datatype = Datatype(type: Double.self)! let attributeId = name.withCString{ return H5Acreate2(id, $0, datatype.id, dataspace.id, 0, 0) } return attributeId } /// Write an attribute public func writeAttribute(attributeId: hid_t, value: Double) { let datatype = Datatype(type: Double.self)! var cValue = CDouble(value) H5Awrite(attributeId, datatype.id, &cValue) } /// Close an attribute public func closeAttribute(attributeId: hid_t) { H5Aclose(attributeId) }
The text was updated successfully, but these errors were encountered:
eb99842
Done!
Sorry, something went wrong.
No branches or pull requests
As far as I can tell, this library does not include support for reading/writing/deleting attributes ( https://www.hdfgroup.org/HDF5/doc1.6/UG/13_Attributes.html )
While it's not clean or complete, I was able to create attributes of type Double on groups by adding this code to Group.swift:
The text was updated successfully, but these errors were encountered: