Constructor
new H5DataSet(file, name, optionsopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
file |
string | Path to the HDF5 file. |
||
name |
string | Name of the dataset inside the file. |
||
options |
object |
<optional> |
{}
|
Optional parameters. |
Extends
Classes
Members
attributes :Array
- Source:
- Overrides:
Array containing the names of all attributes of this object.
Type:
- Array
file :string
- Source:
- Overrides:
Path to the HDF5 file.
Type:
- string
name :string
- Source:
- Overrides:
Name of the object inside the file.
Type:
- string
shape :Array
Array of integers containing the dimensions of the dataset. If this is empty, the dataset is a scalar.
Type:
- Array
type :string|H5StringType|H5EnumType|H5CompoundType
The type of the dataset. For strings, this will be one of:
"IntX"
or"UintX"
forX
of 8, 16, 32, or 64."FloatX"
may forX
of 32 or 64."Other"
, for an unknown type.
Type:
- string | H5StringType | H5EnumType | H5CompoundType
values :Array|TypedArray
The contents of this dataset.
This has length equal to the product of shape
;
unless this dataset is scalar, in which case it has length 1.
Type:
- Array | TypedArray
Methods
readAttribute(attr) → {object}
- Source:
- Overrides:
Read an attribute of the object.
Parameters:
Name | Type | Description |
---|---|---|
attr |
string | Name of the attribute. |
Returns:
Object containing;
values
, an array containing the values of the attribute. This is of length 1 if the attribute is scalar.shape
, an array specifying the shape of the attribute. This is empty if the attribute is scalar.type
, the type of the attribute. This may be a string, a H5StringType, a H5EnumType or a H5CompoundType.
- Type
- object
write(x, optionsopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
x |
Array | TypedArray | number | string | Values to write to the dataset.
This should be of length equal to the product of |
||
options |
object |
<optional> |
{}
|
Optional parameters. |
Returns:
x
is written to the dataset on file.
No return value is provided.
writeAttribute(attr, type, shapenullable, x, optionsopt)
- Source:
- Overrides:
Write an attribute for the object.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
attr |
string | Name of the attribute. |
||
type |
string | H5StringType | H5EnumType | H5CompoundType | Type of dataset to create.
Strings 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. |