H5DataSet

H5DataSet

Representation of a dataset inside a HDF5 file. This is an abstract interface that should not be created directly.

Members

attributes :Array

Description:
  • Array containing the names of all attributes of this object.

Source:

Array containing the names of all attributes of this object.

Type:
  • Array

Methods

close()

Source:
Returns:

Closes the dataset handle. Any subsequent method invocations on this dataset need not be valid.

readAttribute(attr) → {object}

Source:
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 of shape for non-scalar attributes.
  • shape, an Array containing the dimensions of the attribute. This is empty for scalar attributes, in which case values will have length 1.
Type
object

shape() → {Array}

Source:
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}

Source:
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}

Source:
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)

Source:
Parameters:
Name Type Description
x Array | TypedArray

Values to write to the dataset. This should be of length equal to the product of shape - unless shape is empty, in which case it should be of length 1.

Returns:

x is written to the dataset on file. No return value is provided.