class_docstr: A Forecast that contains arrays (i.e. time series) for quantiles and mean.
  
  Parameters
  ----------
  forecast_arrays
      An array of forecasts
  start_date
      start of the forecast
  forecast_keys
      A list of quantiles of the form '0.1', '0.9', etc.,
      and potentially 'mean'. Each entry corresponds to one array in
      forecast_arrays.
  item_id
      Identifier of the item being forecasted.
  info
      Additional information that the forecaster may provide e.g. estimated
      parameters, number of iterations ran etc.
class_docstr_tok: ["A","Forecast","that","contains","arrays","(","i.e",".","time","series",")","for","quantiles","and","mean",".","Parameters","--","--","--","--","--","forecast_arrays","An","array","of","forecasts","start_date","start","of","the","forecast","forecast_keys","A","list","of","quantiles","of","the","form","'","0.1","'",",","'","0.9","'",",","etc.",",","and","potentially","'mean","'",".","Each","entry","corresponds","to","one","array","in","forecast_arrays",".","item_id","Identifier","of","the","item","being","forecasted",".","info","Additional","information","that","the","forecaster","may","provide","e.g",".","estimated","parameters",",","number","of","iterations","ran","etc","."]
code: def __init__(
      self,
      forecast_arrays: np.ndarray,
      start_date: pd.Period,
      forecast_keys: List[str],
      item_id: Optional[str] = None,
      info: Optional[Dict] = None,
  ) -> None:
      self.forecast_array = forecast_arrays
      assert isinstance(
          start_date, pd.Period
      ), "start_date should be a pandas Period object"
      self.start_date = start_date
  
      # normalize keys
      self.forecast_keys = [
          Quantile.from_str(key).name if key != "mean" else key
          for key in forecast_keys
      ]
      self.item_id = item_id
      self.info = info
      self._dim: Optional[int] = None
  
      shape = self.forecast_array.shape
      assert shape[0] == len(self.forecast_keys), (
          f"The forecast_array (shape={shape} should have the same "
          f"length as the forecast_keys (len={len(self.forecast_keys)})."
      )
      self.prediction_length = shape[1]
      self._forecast_dict = {
          k: self.forecast_array[i]
          for i, k in enumerate(self.forecast_keys)
      }
      self._nan_out = np.array([np.nan] * self.prediction_length)
  
imports: import re
  import logging
  from dataclasses import field
  from typing import Callable, Dict, List, Optional, Union, Tuple
  import numpy
  import pandas
  from gluonts.core.component import validated
  from gluonts.pydantic import dataclass
  from gluonts import maybe
label_desc: Use image node_id 1 to create a new QuantileForecast object from inherited base classes: Forecast with example: obj = QuantileForecast(forecast_arrays, start_date, forecast_keys, item_id, info)