class_docstr: Specification for user provided input data.
  
  Parameters
  ----------
  ndim, optional
      The expected number of dimensions of the input data. If provided, it is
      ensured that the input array has the expected number of dimensions.
  tdim, optional
      Mark an array as a time series and specifies which axis is the time
      dimension. When this value is ``None`` the array is classified as
      ``"static``".
  dtype
      The data type, passed to ``numpy.array``.
  past_only
      If the value is a time series, this marks if data is only expected for
      the past range when loading ``zebras.SplitFrame``. The value is ignored
      for static fields.
  required
      When set to true, the field has to be in the user data. Otherwise
      ``default`` is used as a fallback value.
  internal
      Allows to ignore user provided data when set, and instead ``default``
      is always used as the value.
  default
      The default value to use when either ``required`` or ``internal`` is
      set to true.
  preprocess, optional
      This function is called on the value before validating the value. For
      example, one can set ``preprocess = np.atleast_2d`` to also allow
      one dimensional arrays as input even when ``ndim = 2``.
docstr: Load field ``name`` from ``data`` and apply validation.
  
  Note: We do the lookup of the value in this function, since the field
  can be optional.
docstr_tok: ["Load","field","``","name","``","from","``","data","``","and","apply","validation",".","Note",":","We","do","the","lookup","of","the","value","in","this","function",",","since","the","field","can","be","optional","."]
code: def _load(self, value, length: Optional[int] = None) -> np.ndarray:
      """Load field ``name`` from ``data`` and apply validation.
  
      Note: We do the lookup of the value in this function, since the field
      can be optional.
      """
  
      value = np.array(value, dtype=self.dtype)
  
      if value.ndim == 0 and not self.required:
          assert self.ndim is None or self.ndim == 1
          assert length is not None
  
          value = np.full(length, self.default)
  
      if self.ndim is not None:
          assert value.ndim == self.ndim, (
              "Incorrect number of dimensions. "
              f"Expected ndim = {self.ndim}, got: {value.ndim}"
          )
  
      return value
  
imports: from typing import Any, Callable, Optional, Union, Type, Dict
  import numpy
  from gluonts.itertools import partition
  from gluonts.pydantic import parse_obj_as, BaseModel
  from ._freq import Freq
  from ._period import Period
  from ._time_frame import time_frame, TimeFrame
  from ._split_frame import split_frame, SplitFrame
label_desc: Use image node_id 1 for calling the TimeSeries obj's underlying member method code with example usage: obj._load(value, length) and returns: value