yt.units.yt_array.YTArray.write_hdf5 — The yt Project 3.2-dev documentation

# yt.units.yt_array.YTArray.write_hdf5

`YTArray.` `write_hdf5`(filename, dataset_name=None, info=None)

  Writes ImageArray to hdf5 file.

  Parameters: | filename: string : The filename to create and write a dataset to dataset_name: string : The name of the dataset to create in the file. info: dictionary : A dictionary of supplementary info to write to append as attributes to the dataset.

  Examples

      >>> a = YTArray([1,2,3], 'cm')

      >>> myinfo = {'field':'dinosaurs', 'type':'field_data'}

      >>> a.write_hdf5('test_array_data.h5', dataset_name='dinosaurs',
      ...              info=myinfo)