Constructor
new H5Base(file, name)
Parameters:
Name | Type | Description |
---|---|---|
file |
string | Path to the HDF5 file. |
name |
string | Name of the object inside the file. |
Classes
Members
attributes :Array
Array containing the names of all attributes of this object.
Type:
- Array
file :string
Path to the HDF5 file.
Type:
- string
name :string
Name of the object inside the file.
Type:
- string
Methods
readAttribute(attr) → {object}
Read an attribute of the object.
Parameters:
Name | Type | Description |
---|---|---|
attr |
string | Name of the attribute. |
Returns:
Object containing the attribute values
and the shape
of the attribute.
For HDF5 enums, an additional level
property is present, containing the levels indexed by the integer values
.
- Type
- object
writeAttribute(attr, type, shapenullable, x, optionsopt)
Write an attribute for the object.
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
attr |
string | Name of the attribute. |
|||||||||||||||||
type |
string | Type of dataset to create.
This can be |
|||||||||||||||||
shape |
Array |
<nullable> |
Array containing the dimensions of the dataset to create.
If set to an empty array, this will create a scalar dataset.
If set to |
||||||||||||||||
x |
TypedArray | Array | string | number | Values to be written to the new dataset, see |
|||||||||||||||||
options |
object |
<optional> |
{}
|
Optional parameters. Properties
|