Skip to main content

write_attribute

Method of HDF5File.

Overloads

NameDescription
write_attribute(const string path, const string name, const integer value) -> HDF5FileWrites an attribute and returns the file for chaining.
write_attribute(const string path, const string name, const real value) -> HDF5FileWrites an attribute and returns the file for chaining.
write_attribute(const string path, const string name, const bool value) -> HDF5FileWrites an attribute and returns the file for chaining.
write_attribute(const string path, const string name, const complex value) -> HDF5FileWrites an attribute and returns the file for chaining.
write_attribute(const string path, const string name, const List values, as_string type) -> HDF5FileWrites a string list attribute and returns the file for chaining.
write_attribute(const string path, const string name, const List values, as_complex type) -> HDF5FileWrites a complex list attribute and returns the file for chaining.
write_attribute(const string path, const string name, const List values, as_real type) -> HDF5FileWrites a real list attribute and returns the file for chaining.
write_attribute(const string path, const string name, const List values, as_integer type) -> HDF5FileWrites a integer list attribute and returns the file for chaining.
write_attribute(const string path, const string name, const List values, as_bool type) -> HDF5FileWrites a bool list attribute and returns the file for chaining.
write_attribute(const string path, const string name, const List values) -> HDF5FileWrites a list attribute and returns the file for chaining.
write_attribute(const string path, const string name, const string value) -> HDF5FileWrites an attribute and returns the file for chaining.

write_attribute(const string path, const string name, const integer value) -> HDF5File

Writes an attribute and returns the file for chaining.

Parameters

  • path: Object path ("/" for file-level attributes).
  • name: Attribute name.
  • value: Scalar value to write.

Returns

Reference to the same HDF5File instance.

Example

var f = HDF5File("data.h5", "w")
f.write_attribute("/", "creator", "me")

write_attribute(const string path, const string name, const real value) -> HDF5File

Writes an attribute and returns the file for chaining.

Parameters

  • path: Object path ("/" for file-level attributes).
  • name: Attribute name.
  • value: Scalar value to write.

Returns

Reference to the same HDF5File instance.

Example

var f = HDF5File("data.h5", "w")
f.write_attribute("/", "creator", "me")

write_attribute(const string path, const string name, const bool value) -> HDF5File

Writes an attribute and returns the file for chaining.

Parameters

  • path: Object path ("/" for file-level attributes).
  • name: Attribute name.
  • value: Scalar value to write.

Returns

Reference to the same HDF5File instance.

Example

var f = HDF5File("data.h5", "w")
f.write_attribute("/", "creator", "me")

write_attribute(const string path, const string name, const complex value) -> HDF5File

Writes an attribute and returns the file for chaining.

Parameters

  • path: Object path ("/" for file-level attributes).
  • name: Attribute name.
  • value: Scalar value to write.

Returns

Reference to the same HDF5File instance.

Example

var f = HDF5File("data.h5", "w")
f.write_attribute("/", "creator", "me")

write_attribute(const string path, const string name, const List values, as_string type) -> HDF5File

Writes a string list attribute and returns the file for chaining.

Parameters

  • path: Object path ("/" for file-level attributes).
  • name: Attribute name.
  • values: List of primitive values.
  • type: Type tag (as_string).

Returns

Reference to the same HDF5File instance.

write_attribute(const string path, const string name, const List values, as_complex type) -> HDF5File

Writes a complex list attribute and returns the file for chaining.

Parameters

  • path: Object path ("/" for file-level attributes).
  • name: Attribute name.
  • values: List of primitive values.
  • type: Type tag (as_complex).

Returns

Reference to the same HDF5File instance.

write_attribute(const string path, const string name, const List values, as_real type) -> HDF5File

Writes a real list attribute and returns the file for chaining.

Parameters

  • path: Object path ("/" for file-level attributes).
  • name: Attribute name.
  • values: List of primitive values.
  • type: Type tag (as_real).

Returns

Reference to the same HDF5File instance.

write_attribute(const string path, const string name, const List values, as_integer type) -> HDF5File

Writes a integer list attribute and returns the file for chaining.

Parameters

  • path: Object path ("/" for file-level attributes).
  • name: Attribute name.
  • values: List of primitive values.
  • type: Type tag (as_integer).

Returns

Reference to the same HDF5File instance.

write_attribute(const string path, const string name, const List values, as_bool type) -> HDF5File

Writes a bool list attribute and returns the file for chaining.

Parameters

  • path: Object path ("/" for file-level attributes).
  • name: Attribute name.
  • values: List of primitive values.
  • type: Type tag (as_bool).

Returns

Reference to the same HDF5File instance.

write_attribute(const string path, const string name, const List values) -> HDF5File

Writes a list attribute and returns the file for chaining.

Parameters

  • path: Object path ("/" for file-level attributes).
  • name: Attribute name.
  • values: List of primitive values.

Returns

Reference to the same HDF5File instance.

write_attribute(const string path, const string name, const string value) -> HDF5File

Writes an attribute and returns the file for chaining.

Parameters

  • path: Object path ("/" for file-level attributes).
  • name: Attribute name.
  • value: Scalar value to write.

Returns

Reference to the same HDF5File instance.

Example

var f = HDF5File("data.h5", "w")
f.write_attribute("/", "creator", "me")