Members
attributes :Array
Array containing the names of all attributes of this object.
Type:
- Array
Methods
close()
Returns:
Closes the dataset handle. Any subsequent method invocations on this dataset need not be valid.
readAttribute(attr) → {object}
Parameters:
Name | Type | Description |
---|---|---|
attr |
string | Name of the attribute. |
Returns:
Object containing:
values
, an Array or TypedArray containing the attribute data. This should have length equal to the product ofshape
for non-scalar attributes.shape
, an Array containing the dimensions of the attribute. This is empty for scalar attributes, in which casevalues
will have length 1.
- Type
- object
shape() → {Array}
Returns:
Array of integers containing the dimensions of the dataset. If this is an empty array, the dataset is a scalar.
- Type
- Array
type() → {string|object}
Returns:
String containing the type of the dataset.
This may be "IntX"
or "UintX"
for X
of 8, 16, 32, or 64; or "FloatX"
for X
of 32 or 64; or "String"
.
Alternatively, this may be an object representing a compound dataype, where keys and values are the names and types of each component.
- Type
- string | object
values() → {Array|TypedArray}
Returns:
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.
For compound datatypes, each element of the output array is an object.
- Type
- Array | TypedArray
write(x)
Parameters:
Name | Type | Description |
---|---|---|
x |
Array | TypedArray | Values to write to the dataset.
This should be of length equal to the product of |
Returns:
x
is written to the dataset on file.
No return value is provided.