class_docstr: Writer class for HDF5 files consumed by HDF5FXRateReader.
      
docstr: Write data to the file.
  
  Parameters
  ----------
  dts : pd.DatetimeIndex
      Index of row labels for rates to be written.
  currencies : np.array[object]
      Array of column labels for rates to be written.
  data : iterator[(str, str, np.array[float64])]
      Iterator of (rate, quote_currency, array) tuples. Each array
      should be of shape ``(len(dts), len(currencies))``, and should
      contain a table of rates where each column is a timeseries of rates
      mapping its column label's currency to ``quote_currency``.
docstr_tok: ["Write","data","to","the","file",".","Parameters","--","--","--","--","--","dts",":","pd.DatetimeIndex","Index","of","row","labels","for","rates","to","be","written",".","currencies",":","np.array","[","object","]","Array","of","column","labels","for","rates","to","be","written",".","data",":","iterator","[","(","str",",","str",",","np.array","[","float64","]",")","]","Iterator","of","(","rate",",","quote_currency",",","array",")","tuples",".","Each","array","should","be","of","shape","``","(","len","(","dts",")",",","len","(","currencies",")",")","``",",","and","should","contain","a","table","of","rates","where","each","column","is","a","timeseries","of","rates","mapping","its","column","label","'s","currency","to","``","quote_currency","``","."]
code: def write(self, dts, currencies, data):
      """Write data to the file.
  
      Parameters
      ----------
      dts : pd.DatetimeIndex
          Index of row labels for rates to be written.
      currencies : np.array[object]
          Array of column labels for rates to be written.
      data : iterator[(str, str, np.array[float64])]
          Iterator of (rate, quote_currency, array) tuples. Each array
          should be of shape ``(len(dts), len(currencies))``, and should
          contain a table of rates where each column is a timeseries of rates
          mapping its column label's currency to ``quote_currency``.
      """
  
      if len(currencies):
          chunks = (
              len(currencies),
              min(self._date_chunk_size, len(dts)),
          )
      else:
          # h5py crashes if we provide chunks for empty data.
          chunks = None
  
      self._write_metadata()
      self._write_index_group(dts, currencies)
      self._write_data_group(dts, currencies, data, chunks)
  
imports: from interface import implements
  import h5py
  from logbook import Logger
  import numpy
  import pandas
  from zipline.utils.memoize import lazyval
  from zipline.utils.numpy_utils import bytes_array_to_native_str_object_array
  from .base import FXRateReader, DEFAULT_FX_RATE
  from .utils import check_dts, is_sorted_ascending
label_desc: Use image node_id 2 for calling the HDF5FXRateWriter obj's underlying member method code with example usage: obj.write(dts, currencies, data) without return types